Add breaking test that allowed incomplete builders to be created
This commit is contained in:
parent
0b88051318
commit
aaadd25ddc
|
@ -1340,6 +1340,9 @@ mod test {
|
||||||
let builder = builder.add_leaf(2, b.clone()).unwrap();
|
let builder = builder.add_leaf(2, b.clone()).unwrap();
|
||||||
let builder = builder.add_leaf(2, c.clone()).unwrap();
|
let builder = builder.add_leaf(2, c.clone()).unwrap();
|
||||||
let builder = builder.add_leaf(3, d.clone()).unwrap();
|
let builder = builder.add_leaf(3, d.clone()).unwrap();
|
||||||
|
|
||||||
|
// Trying to finalize an incomplete tree returns the Err(builder)
|
||||||
|
let builder = builder.finalize(&secp, internal_key).unwrap_err();
|
||||||
let builder = builder.add_leaf(3, e.clone()).unwrap();
|
let builder = builder.add_leaf(3, e.clone()).unwrap();
|
||||||
|
|
||||||
let tree_info = builder.finalize(&secp, internal_key).unwrap();
|
let tree_info = builder.finalize(&secp, internal_key).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue