File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ impl TryFrom<TaprootBuilder> for TapTree {
194
194
/// A [`TapTree`] iff the `builder` is complete, otherwise return [`IncompleteTapTree`]
195
195
/// error with the content of incomplete `builder` instance.
196
196
fn try_from ( builder : TaprootBuilder ) -> Result < Self , Self :: Error > {
197
- if !builder. is_finalized ( ) {
197
+ if !builder. is_finalizable ( ) {
198
198
Err ( IncompleteTapTree :: NotFinalized ( builder) )
199
199
} else if builder. has_hidden_nodes ( ) {
200
200
Err ( IncompleteTapTree :: HiddenParts ( builder) )
Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ impl Deserialize for TapTree {
343
343
builder = builder. add_leaf_with_ver ( * depth, script, leaf_version)
344
344
. map_err ( |_| encode:: Error :: ParseFailed ( "Tree not in DFS order" ) ) ?;
345
345
}
346
- if builder. is_finalized ( ) && !builder. has_hidden_nodes ( ) {
346
+ if builder. is_finalizable ( ) && !builder. has_hidden_nodes ( ) {
347
347
Ok ( TapTree ( builder) )
348
348
} else {
349
349
Err ( encode:: Error :: ParseFailed ( "Incomplete taproot Tree" ) )
Original file line number Diff line number Diff line change @@ -441,7 +441,7 @@ impl TaprootBuilder {
441
441
}
442
442
443
443
/// Checks if the builder has finalized building a tree.
444
- pub fn is_finalized ( & self ) -> bool {
444
+ pub fn is_finalizable ( & self ) -> bool {
445
445
self . branch . len ( ) == 1 && self . branch [ 0 ] . is_some ( )
446
446
}
447
447
@@ -452,8 +452,8 @@ impl TaprootBuilder {
452
452
453
453
/// Creates a [`TaprootSpendInfo`] with the given internal key.
454
454
///
455
- /// Returns the unmodified builder as Err if the builder is not finalized .
456
- /// See also [`TaprootBuilder::is_finalized `]
455
+ /// Returns the unmodified builder as Err if the builder is not finalizable .
456
+ /// See also [`TaprootBuilder::is_finalizable `]
457
457
pub fn finalize < C : secp256k1:: Verification > (
458
458
mut self ,
459
459
secp : & Secp256k1 < C > ,
You can’t perform that action at this time.
0 commit comments