Skip to content

Commit 00495a5

Browse files
committed
descriptor: add unit test from sanket
1 parent 9bf3f10 commit 00495a5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/descriptor/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,17 +1522,20 @@ mod tests {
15221522
"tr({},{{pk({}),{{pk({}),or_d(pk({}),pkh({}))}}}})",
15231523
p1, p2, p3, p4, p5
15241524
))
1525-
.unwrap()
1526-
.to_string();
1525+
.unwrap();
15271526

15281527
// p5.to_pubkeyhash() = 516ca378e588a7ed71336147e2a72848b20aca1a
15291528
assert_eq!(
1530-
descriptor,
1529+
descriptor.to_string(),
15311530
format!(
15321531
"tr({},{{pk({}),{{pk({}),or_d(pk({}),pkh({}))}}}})#tvu28c0s",
15331532
p1, p2, p3, p4, p5
15341533
)
1535-
)
1534+
);
1535+
assert_eq!(
1536+
descriptor.spend_info().merkle_root().unwrap().to_string(),
1537+
"e1597abcb76f7cbc0792cf04a9c2d4f39caed1ede0afef772064126f28c69b09"
1538+
);
15361539
}
15371540

15381541
#[test]

0 commit comments

Comments
 (0)