Unit test for failing TapTree on builder containing hidden nodes.
This commit is contained in:
parent
77715311cf
commit
c036b0db6f
|
@ -388,6 +388,14 @@ mod tests {
|
|||
builder
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn taptree_hidden() {
|
||||
let mut builder = compose_taproot_builder(0x51, &[2, 2, 2]);
|
||||
builder = builder.add_leaf_with_ver(3, Script::from_hex("b9").unwrap(), LeafVersion::from_consensus(0xC2).unwrap()).unwrap();
|
||||
builder = builder.add_hidden_node(3, sha256::Hash::default()).unwrap();
|
||||
assert!(TapTree::from_inner(builder.clone()).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn taptree_roundtrip() {
|
||||
let mut builder = compose_taproot_builder(0x51, &[2, 2, 2, 3]);
|
||||
|
|
Loading…
Reference in New Issue