@@ -62,17 +62,17 @@ impl TimeLockInfo {
62
62
63
63
// handy function for combining `and` timelocks
64
64
// This can be operator overloaded in future
65
- pub ( crate ) fn comb_and_timelocks ( a : Self , b : Self ) -> Self {
66
- Self :: combine_thresh_timelocks ( 2 , once ( a) . chain ( once ( b) ) )
65
+ pub ( crate ) fn combine_and ( a : Self , b : Self ) -> Self {
66
+ Self :: combine_threshold ( 2 , once ( a) . chain ( once ( b) ) )
67
67
}
68
68
69
69
// handy function for combining `or` timelocks
70
70
// This can be operator overloaded in future
71
- pub ( crate ) fn comb_or_timelocks ( a : Self , b : Self ) -> Self {
72
- Self :: combine_thresh_timelocks ( 1 , once ( a) . chain ( once ( b) ) )
71
+ pub ( crate ) fn combine_or ( a : Self , b : Self ) -> Self {
72
+ Self :: combine_threshold ( 1 , once ( a) . chain ( once ( b) ) )
73
73
}
74
74
75
- pub ( crate ) fn combine_thresh_timelocks < I > ( k : usize , sub_timelocks : I ) -> TimeLockInfo
75
+ pub ( crate ) fn combine_threshold < I > ( k : usize , sub_timelocks : I ) -> TimeLockInfo
76
76
where
77
77
I : IntoIterator < Item = TimeLockInfo > ,
78
78
{
@@ -505,7 +505,7 @@ impl Property for ExtData {
505
505
max_dissat_size : l
506
506
. max_dissat_size
507
507
. and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
508
- timelock_info : TimeLockInfo :: comb_and_timelocks ( l. timelock_info , r. timelock_info ) ,
508
+ timelock_info : TimeLockInfo :: combine_and ( l. timelock_info , r. timelock_info ) ,
509
509
// Left element leaves a stack result on the stack top and then right element is evaluated
510
510
// Therefore + 1 is added to execution size of second element
511
511
exec_stack_elem_count_sat : opt_max (
@@ -536,7 +536,7 @@ impl Property for ExtData {
536
536
. max_sat_size
537
537
. and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
538
538
max_dissat_size : None ,
539
- timelock_info : TimeLockInfo :: comb_and_timelocks ( l. timelock_info , r. timelock_info ) ,
539
+ timelock_info : TimeLockInfo :: combine_and ( l. timelock_info , r. timelock_info ) ,
540
540
// [X] leaves no element after evaluation, hence this is the max
541
541
exec_stack_elem_count_sat : opt_max (
542
542
l. exec_stack_elem_count_sat ,
@@ -576,7 +576,7 @@ impl Property for ExtData {
576
576
max_dissat_size : l
577
577
. max_dissat_size
578
578
. and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
579
- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
579
+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
580
580
exec_stack_elem_count_sat : cmp:: max (
581
581
opt_max (
582
582
l. exec_stack_elem_count_sat ,
@@ -619,7 +619,7 @@ impl Property for ExtData {
619
619
max_dissat_size : l
620
620
. max_dissat_size
621
621
. and_then ( |( lw, ls) | r. max_dissat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
622
- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
622
+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
623
623
exec_stack_elem_count_sat : cmp:: max (
624
624
l. exec_stack_elem_count_sat ,
625
625
opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -653,7 +653,7 @@ impl Property for ExtData {
653
653
. and_then ( |( lw, ls) | r. max_sat_size . map ( |( rw, rs) | ( lw + rw, ls + rs) ) ) ,
654
654
) ,
655
655
max_dissat_size : None ,
656
- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
656
+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
657
657
exec_stack_elem_count_sat : cmp:: max (
658
658
l. exec_stack_elem_count_sat ,
659
659
opt_max ( r. exec_stack_elem_count_sat , l. exec_stack_elem_count_dissat ) ,
@@ -696,7 +696,7 @@ impl Property for ExtData {
696
696
( Some ( l) , None ) => Some ( ( 2 + l. 0 , 1 + l. 1 ) ) ,
697
697
( None , None ) => None ,
698
698
} ,
699
- timelock_info : TimeLockInfo :: comb_or_timelocks ( l. timelock_info , r. timelock_info ) ,
699
+ timelock_info : TimeLockInfo :: combine_or ( l. timelock_info , r. timelock_info ) ,
700
700
// TODO: fix elem count dissat bug
701
701
exec_stack_elem_count_sat : cmp:: max (
702
702
l. exec_stack_elem_count_sat ,
@@ -739,8 +739,8 @@ impl Property for ExtData {
739
739
max_dissat_size : a
740
740
. max_dissat_size
741
741
. and_then ( |( wa, sa) | c. max_dissat_size . map ( |( wc, sc) | ( wa + wc, sa + sc) ) ) ,
742
- timelock_info : TimeLockInfo :: comb_or_timelocks (
743
- TimeLockInfo :: comb_and_timelocks ( a. timelock_info , b. timelock_info ) ,
742
+ timelock_info : TimeLockInfo :: combine_or (
743
+ TimeLockInfo :: combine_and ( a. timelock_info , b. timelock_info ) ,
744
744
c. timelock_info ,
745
745
) ,
746
746
exec_stack_elem_count_sat : cmp:: max (
@@ -876,7 +876,7 @@ impl Property for ExtData {
876
876
stack_elem_count_dissat,
877
877
max_sat_size,
878
878
max_dissat_size,
879
- timelock_info : TimeLockInfo :: combine_thresh_timelocks ( k, timelocks) ,
879
+ timelock_info : TimeLockInfo :: combine_threshold ( k, timelocks) ,
880
880
exec_stack_elem_count_sat,
881
881
exec_stack_elem_count_dissat,
882
882
} )
0 commit comments