@@ -63,17 +63,17 @@ impl TimeLockInfo {
63
63
64
64
// handy function for combining `and` timelocks
65
65
// 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) ) )
68
68
}
69
69
70
70
// handy function for combining `or` timelocks
71
71
// 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) ) )
74
74
}
75
75
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
77
77
where
78
78
I : IntoIterator < Item = TimeLockInfo > ,
79
79
{
@@ -518,7 +518,7 @@ impl Property for ExtData {
518
518
max_dissat_size : l
519
519
. max_dissat_size
520
520
. 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 ) ,
522
522
// Left element leaves a stack result on the stack top and then right element is evaluated
523
523
// Therefore + 1 is added to execution size of second element
524
524
exec_stack_elem_count_sat : opt_max (
@@ -549,7 +549,7 @@ impl Property for ExtData {
549
549
. max_sat_size
550
550
. and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
551
551
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 ) ,
553
553
// [X] leaves no element after evaluation, hence this is the max
554
554
exec_stack_elem_count_sat : opt_max (
555
555
l. exec_stack_elem_count_sat ,
@@ -589,7 +589,7 @@ impl Property for ExtData {
589
589
max_dissat_size : l
590
590
. max_dissat_size
591
591
. 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 ) ,
593
593
exec_stack_elem_count_sat : cmp:: max (
594
594
opt_max (
595
595
l. exec_stack_elem_count_sat ,
@@ -632,7 +632,7 @@ impl Property for ExtData {
632
632
max_dissat_size : l
633
633
. max_dissat_size
634
634
. 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 ) ,
636
636
exec_stack_elem_count_sat : cmp:: max (
637
637
l. exec_stack_elem_count_sat ,
638
638
opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -666,7 +666,7 @@ impl Property for ExtData {
666
666
. and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
667
667
) ,
668
668
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 ) ,
670
670
exec_stack_elem_count_sat : cmp:: max (
671
671
l. exec_stack_elem_count_sat ,
672
672
opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -709,7 +709,7 @@ impl Property for ExtData {
709
709
( Some ( l) , None ) => Some ( ( 2 + l. 0 , 1 + l. 1 ) ) ,
710
710
( None , None ) => None ,
711
711
} ,
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 ) ,
713
713
// TODO: fix elem count dissat bug
714
714
exec_stack_elem_count_sat : cmp:: max (
715
715
l. exec_stack_elem_count_sat ,
@@ -752,8 +752,8 @@ impl Property for ExtData {
752
752
max_dissat_size : a
753
753
. max_dissat_size
754
754
. 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 ) ,
757
757
c. timelock_info ,
758
758
) ,
759
759
exec_stack_elem_count_sat : cmp:: max (
@@ -884,7 +884,7 @@ impl Property for ExtData {
884
884
stack_elem_count_dissat,
885
885
max_sat_size,
886
886
max_dissat_size,
887
- timelock_info : TimeLockInfo :: combine_thresh_timelocks ( k, timelocks) ,
887
+ timelock_info : TimeLockInfo :: combine_threshold ( k, timelocks) ,
888
888
exec_stack_elem_count_sat,
889
889
exec_stack_elem_count_dissat,
890
890
} )
0 commit comments