Skip to content

Commit ca60da2

Browse files
authored
Merge pull request #184 from afilini/feat/sortedmultivec-new-pub
descriptor: Make `SortedMultiVec::new()` public
2 parents 00b9003 + e455636 commit ca60da2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/descriptor/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,10 @@ pub struct SortedMultiVec<Pk: MiniscriptKey, Ctx: ScriptContext> {
14481448
}
14491449

14501450
impl<Pk: MiniscriptKey, Ctx: ScriptContext> SortedMultiVec<Pk, Ctx> {
1451-
fn new(k: usize, pks: Vec<Pk>) -> Result<Self, Error> {
1451+
/// Create a new instance of `SortedMultiVec` given a list of keys and the threshold
1452+
///
1453+
/// Internally checks all the applicable size limits and pubkey types limitations according to the current `Ctx`.
1454+
pub fn new(k: usize, pks: Vec<Pk>) -> Result<Self, Error> {
14521455
// Check the limits before creating a new SortedMultiVec
14531456
// For example, under p2sh context the scriptlen can only be
14541457
// upto 520 bytes.

0 commit comments

Comments
 (0)