Skip to content

Commit

Permalink
Return EmptyTree instead of OverCompleteTree when there are no scripts
Browse files Browse the repository at this point in the history
to add
  • Loading branch information
sanket1729 committed Jul 29, 2022
1 parent ed3fb45 commit 5813ec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/taproot.rs
Expand Up @@ -392,7 +392,7 @@ impl TaprootBuilder {
node_weights.push((Reverse(p), NodeInfo::new_leaf_with_ver(leaf, LeafVersion::TapScript)));
}
if node_weights.is_empty() {
return Err(TaprootBuilderError::IncompleteTree);
return Err(TaprootBuilderError::EmptyTree);
}
while node_weights.len() > 1 {
// Combine the last two elements and insert a new node
Expand Down

0 comments on commit 5813ec7

Please sign in to comment.