Skip to content

Commit 928f9c6

Browse files
committed
dsl: add regression test for and_or() descriptor
1 parent 814ab4c commit 928f9c6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/descriptor/dsl.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,25 @@ mod test {
790790
);
791791
}
792792

793+
#[test]
794+
fn test_fixed_threeop_descriptors() {
795+
let redeem_key = bitcoin::PublicKey::from_str(
796+
"03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd",
797+
)
798+
.unwrap();
799+
let move_key = bitcoin::PublicKey::from_str(
800+
"032e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af",
801+
)
802+
.unwrap();
803+
804+
check(
805+
descriptor!(sh(wsh(and_or(pk(redeem_key), older(1000), pk(move_key))))),
806+
true,
807+
true,
808+
&["2MypGwr5eQWAWWJtiJgUEToVxc4zuokjQRe"],
809+
);
810+
}
811+
793812
#[test]
794813
fn test_bip32_legacy_descriptors() {
795814
let xprv = bip32::ExtendedPrivKey::from_str("tprv8ZgxMBicQKsPcx5nBGsR63Pe8KnRUqmbJNENAfGftF3yuXoMMoVJJcYeUw5eVkm9WBPjWYt6HMWYJNesB5HaNVBaFc1M6dRjWSYnmewUMYy").unwrap();

0 commit comments

Comments
 (0)