File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -111,10 +111,10 @@ impl<Pk: MiniscriptKey> TapTree<Pk> {
111
111
// Helper function to compute height
112
112
// TODO: Instead of computing this every time we add a new leaf, we should
113
113
// add height as a separate field in taptree
114
- fn taptree_height ( & self ) -> usize {
114
+ fn height ( & self ) -> usize {
115
115
match * self {
116
116
TapTree :: Tree ( ref left_tree, ref right_tree) => {
117
- 1 + max ( left_tree. taptree_height ( ) , right_tree. taptree_height ( ) )
117
+ 1 + max ( left_tree. height ( ) , right_tree. height ( ) )
118
118
}
119
119
TapTree :: Leaf ( ..) => 0 ,
120
120
}
@@ -167,7 +167,7 @@ impl<Pk: MiniscriptKey> Tr<Pk> {
167
167
/// Create a new [`Tr`] descriptor from internal key and [`TapTree`]
168
168
pub fn new ( internal_key : Pk , tree : Option < TapTree < Pk > > ) -> Result < Self , Error > {
169
169
Tap :: check_pk ( & internal_key) ?;
170
- let nodes = tree. as_ref ( ) . map ( |t| t. taptree_height ( ) ) . unwrap_or ( 0 ) ;
170
+ let nodes = tree. as_ref ( ) . map ( |t| t. height ( ) ) . unwrap_or ( 0 ) ;
171
171
172
172
if nodes <= TAPROOT_CONTROL_MAX_NODE_COUNT {
173
173
Ok ( Self {
You can’t perform that action at this time.
0 commit comments