Skip to content

Commit b0f3992

Browse files
committed
Rename TaprootBuilder::is_complete into is_finalized
1 parent efa800f commit b0f3992

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/util/psbt/map/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl TapTree {
141141
/// A [`TapTree`] iff the `inner` builder is complete, otherwise return [`IncompleteTapTree`]
142142
/// error with the content of incomplete builder `inner` instance.
143143
pub fn from_inner(inner: TaprootBuilder) -> Result<Self, IncompleteTapTree> {
144-
if !inner.is_complete() {
144+
if !inner.is_finalized() {
145145
Err(IncompleteTapTree::NotFinalized(inner))
146146
} else {
147147
Ok(TapTree(inner))

src/util/psbt/serialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl Deserialize for TapTree {
355355
builder = builder.add_leaf_with_ver(*depth, script, leaf_version)
356356
.map_err(|_| encode::Error::ParseFailed("Tree not in DFS order"))?;
357357
}
358-
if builder.is_complete() {
358+
if builder.is_finalized() {
359359
Ok(TapTree(builder))
360360
} else {
361361
Err(encode::Error::ParseFailed("Incomplete taproot Tree"))

src/util/taproot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ impl TaprootBuilder {
461461
self.insert(node, depth)
462462
}
463463

464-
/// Checks if the builder is a complete tree.
465-
pub fn is_complete(&self) -> bool {
464+
/// Checks if the builder has finalized building a tree.
465+
pub fn is_finalized(&self) -> bool {
466466
self.branch.len() == 1 && self.branch[0].is_some()
467467
}
468468

0 commit comments

Comments
 (0)