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 @@ -695,17 +695,21 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
695695 /// Returns an error if there is at least one satisfaction that contains
696696 /// a combination of heightlock and timelock.
697697 pub fn check_timelocks ( & self ) -> Result < ( ) , PolicyError > {
698- let timelocks = self . check_timelocks_helper ( ) ;
699- if timelocks . contains_combination {
698+ let aggregated_timelock_info = self . timelock_info ( ) ;
699+ if aggregated_timelock_info . contains_combination {
700700 Err ( PolicyError :: HeightTimelockCombination )
701701 } else {
702702 Ok ( ( ) )
703703 }
704704 }
705705
706- // Checks whether the given concrete policy contains a combination of
707- // timelocks and heightlocks
708- fn check_timelocks_helper ( & self ) -> TimelockInfo {
706+ /// Processes `Policy` using `post_order_iter`, creates a `TimelockInfo` for each `Nullary` node
707+ /// and combines them together for `Nary` nodes.
708+ ///
709+ /// # Returns
710+ ///
711+ /// A single `TimelockInfo` that is the combination of all others after processing each node.
712+ fn timelock_info ( & self ) -> TimelockInfo {
709713 use Policy :: * ;
710714
711715 let mut infos = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments