@@ -63,17 +63,17 @@ impl TimeLockInfo {
6363
6464 // handy function for combining `and` timelocks
6565 // This can be operator overloaded in future
66- pub ( crate ) fn comb_and_timelocks ( a : Self , b : Self ) -> Self {
67- Self :: combine_thresh_timelocks ( 2 , once ( a) . chain ( once ( b) ) )
66+ pub ( crate ) fn combine_and ( a : Self , b : Self ) -> Self {
67+ Self :: combine_threshold ( 2 , once ( a) . chain ( once ( b) ) )
6868 }
6969
7070 // handy function for combining `or` timelocks
7171 // This can be operator overloaded in future
72- pub ( crate ) fn comb_or_timelocks ( a : Self , b : Self ) -> Self {
73- Self :: combine_thresh_timelocks ( 1 , once ( a) . chain ( once ( b) ) )
72+ pub ( crate ) fn combine_or ( a : Self , b : Self ) -> Self {
73+ Self :: combine_threshold ( 1 , once ( a) . chain ( once ( b) ) )
7474 }
7575
76- pub ( crate ) fn combine_thresh_timelocks < I > ( k : usize , sub_timelocks : I ) -> TimeLockInfo
76+ pub ( crate ) fn combine_threshold < I > ( k : usize , sub_timelocks : I ) -> TimeLockInfo
7777 where
7878 I : IntoIterator < Item = TimeLockInfo > ,
7979 {
@@ -518,7 +518,7 @@ impl Property for ExtData {
518518 max_dissat_size : l
519519 . max_dissat_size
520520 . and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
521- timelock_info : TimeLockInfo :: comb_and_timelocks ( l. timelock_info , r. timelock_info ) ,
521+ timelock_info : TimeLockInfo :: combine_and ( l. timelock_info , r. timelock_info ) ,
522522 // Left element leaves a stack result on the stack top and then right element is evaluated
523523 // Therefore + 1 is added to execution size of second element
524524 exec_stack_elem_count_sat : opt_max (
@@ -549,7 +549,7 @@ impl Property for ExtData {
549549 . max_sat_size
550550 . and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
551551 max_dissat_size : None ,
552- timelock_info : TimeLockInfo :: comb_and_timelocks ( l. timelock_info , r. timelock_info ) ,
552+ timelock_info : TimeLockInfo :: combine_and ( l. timelock_info , r. timelock_info ) ,
553553 // [X] leaves no element after evaluation, hence this is the max
554554 exec_stack_elem_count_sat : opt_max (
555555 l. exec_stack_elem_count_sat ,
@@ -589,7 +589,7 @@ impl Property for ExtData {
589589 max_dissat_size : l
590590 . max_dissat_size
591591 . and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
592- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
592+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
593593 exec_stack_elem_count_sat : cmp:: max (
594594 opt_max (
595595 l. exec_stack_elem_count_sat ,
@@ -632,7 +632,7 @@ impl Property for ExtData {
632632 max_dissat_size : l
633633 . max_dissat_size
634634 . and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
635- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
635+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
636636 exec_stack_elem_count_sat : cmp:: max (
637637 l. exec_stack_elem_count_sat ,
638638 opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -666,7 +666,7 @@ impl Property for ExtData {
666666 . and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
667667 ) ,
668668 max_dissat_size : None ,
669- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
669+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
670670 exec_stack_elem_count_sat : cmp:: max (
671671 l. exec_stack_elem_count_sat ,
672672 opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -709,7 +709,7 @@ impl Property for ExtData {
709709 ( Some ( l) , None ) => Some ( ( 2 + l. 0 , 1 + l. 1 ) ) ,
710710 ( None , None ) => None ,
711711 } ,
712- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
712+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
713713 // TODO: fix elem count dissat bug
714714 exec_stack_elem_count_sat : cmp:: max (
715715 l. exec_stack_elem_count_sat ,
@@ -752,8 +752,8 @@ impl Property for ExtData {
752752 max_dissat_size : a
753753 . max_dissat_size
754754 . and_then ( |( wa, sa) | c. max_dissat_size . map ( |( wc, sc) | ( wa + wc, sa + sc) ) ) ,
755- timelock_info : TimeLockInfo :: comb_or_timelocks (
756- TimeLockInfo :: comb_and_timelocks ( a. timelock_info , b. timelock_info ) ,
755+ timelock_info : TimeLockInfo :: combine_or (
756+ TimeLockInfo :: combine_and ( a. timelock_info , b. timelock_info ) ,
757757 c. timelock_info ,
758758 ) ,
759759 exec_stack_elem_count_sat : cmp:: max (
@@ -884,7 +884,7 @@ impl Property for ExtData {
884884 stack_elem_count_dissat,
885885 max_sat_size,
886886 max_dissat_size,
887- timelock_info : TimeLockInfo :: combine_thresh_timelocks ( k, timelocks) ,
887+ timelock_info : TimeLockInfo :: combine_threshold ( k, timelocks) ,
888888 exec_stack_elem_count_sat,
889889 exec_stack_elem_count_dissat,
890890 } )
0 commit comments