File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ impl TapTree {
141
141
/// A [`TapTree`] iff the `inner` builder is complete, otherwise return [`IncompleteTapTree`]
142
142
/// error with the content of incomplete builder `inner` instance.
143
143
pub fn from_inner ( inner : TaprootBuilder ) -> Result < Self , IncompleteTapTree > {
144
- if !inner. is_complete ( ) {
144
+ if !inner. is_finalized ( ) {
145
145
Err ( IncompleteTapTree :: NotFinalized ( inner) )
146
146
} else {
147
147
Ok ( TapTree ( inner) )
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ impl Deserialize for TapTree {
355
355
builder = builder. add_leaf_with_ver ( * depth, script, leaf_version)
356
356
. map_err ( |_| encode:: Error :: ParseFailed ( "Tree not in DFS order" ) ) ?;
357
357
}
358
- if builder. is_complete ( ) {
358
+ if builder. is_finalized ( ) {
359
359
Ok ( TapTree ( builder) )
360
360
} else {
361
361
Err ( encode:: Error :: ParseFailed ( "Incomplete taproot Tree" ) )
Original file line number Diff line number Diff line change @@ -461,8 +461,8 @@ impl TaprootBuilder {
461
461
self . insert ( node, depth)
462
462
}
463
463
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 {
466
466
self . branch . len ( ) == 1 && self . branch [ 0 ] . is_some ( )
467
467
}
468
468
You can’t perform that action at this time.
0 commit comments