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> {
111111 // Helper function to compute height
112112 // TODO: Instead of computing this every time we add a new leaf, we should
113113 // add height as a separate field in taptree
114- fn taptree_height ( & self ) -> usize {
114+ fn height ( & self ) -> usize {
115115 match * self {
116116 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 ( ) )
118118 }
119119 TapTree :: Leaf ( ..) => 0 ,
120120 }
@@ -167,7 +167,7 @@ impl<Pk: MiniscriptKey> Tr<Pk> {
167167 /// Create a new [`Tr`] descriptor from internal key and [`TapTree`]
168168 pub fn new ( internal_key : Pk , tree : Option < TapTree < Pk > > ) -> Result < Self , Error > {
169169 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 ) ;
171171
172172 if nodes <= TAPROOT_CONTROL_MAX_NODE_COUNT {
173173 Ok ( Self {
You can’t perform that action at this time.
0 commit comments