File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -700,17 +700,21 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
700700 /// Returns an error if there is at least one satisfaction that contains
701701 /// a combination of heightlock and timelock.
702702 pub fn check_timelocks ( & self ) -> Result < ( ) , PolicyError > {
703- let timelocks = self . check_timelocks_helper ( ) ;
704- if timelocks . contains_combination {
703+ let aggregated_timelock_info = self . timelock_info ( ) ;
704+ if aggregated_timelock_info . contains_combination {
705705 Err ( PolicyError :: HeightTimelockCombination )
706706 } else {
707707 Ok ( ( ) )
708708 }
709709 }
710710
711- // Checks whether the given concrete policy contains a combination of
712- // timelocks and heightlocks
713- fn check_timelocks_helper ( & self ) -> TimelockInfo {
711+ /// Processes `Policy` using `post_order_iter`, creates a `TimelockInfo` for each `Nullary` node
712+ /// and combines them together for `Nary` nodes.
713+ ///
714+ /// # Returns
715+ ///
716+ /// A single `TimelockInfo` that is the combination of all others after processing each node.
717+ fn timelock_info ( & self ) -> TimelockInfo {
714718 use Policy :: * ;
715719
716720 let mut infos = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments