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 @@ -685,17 +685,21 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
685685 /// Returns an error if there is at least one satisfaction that contains
686686 /// a combination of heightlock and timelock.
687687 pub fn check_timelocks ( & self ) -> Result < ( ) , PolicyError > {
688- let timelocks = self . check_timelocks_helper ( ) ;
689- if timelocks . contains_combination {
688+ let aggregated_timelock_info = self . timelock_info ( ) ;
689+ if aggregated_timelock_info . contains_combination {
690690 Err ( PolicyError :: HeightTimelockCombination )
691691 } else {
692692 Ok ( ( ) )
693693 }
694694 }
695695
696- // Checks whether the given concrete policy contains a combination of
697- // timelocks and heightlocks
698- fn check_timelocks_helper ( & self ) -> TimelockInfo {
696+ /// Processes `Policy` using `post_order_iter`, creates a `TimelockInfo` for each `Nullary` node
697+ /// and combines them together for `Nary` nodes.
698+ ///
699+ /// # Returns
700+ ///
701+ /// A single `TimelockInfo` that is the combination of all others after processing each node.
702+ fn timelock_info ( & self ) -> TimelockInfo {
699703 use Policy :: * ;
700704
701705 let mut infos = vec ! [ ] ;
You can’t perform that action at this time.
0 commit comments