@@ -871,7 +871,7 @@ impl<'stack> Stack<'stack> {
871
871
}
872
872
873
873
/// Helper function to evaluate a After Node. Takes no argument from stack
874
- /// `n CHECKSEQUENCEVERIFY 0NOTEQUAL` and `n CHECKSEQUENCEVERIFY `
874
+ /// `n CHECKLOCKTIMEVERIFY 0NOTEQUAL` and `n CHECKLOCKTIMEVERIFY `
875
875
/// Ideally this should return int value as n: build_scriptint(t as i64)),
876
876
/// The reason we don't need to copy the Script semantics is that
877
877
/// Miniscript never evaluates integers and it is safe to treat them as
@@ -883,14 +883,14 @@ impl<'stack> Stack<'stack> {
883
883
) -> Option < Result < SatisfiedConstraint < ' desc , ' stack > , Error > > {
884
884
if age >= * n {
885
885
self . push ( StackElement :: Satisfied ) ;
886
- Some ( Ok ( SatisfiedConstraint :: RelativeTimeLock { time : n } ) )
886
+ Some ( Ok ( SatisfiedConstraint :: AbsoluteTimeLock { time : n } ) )
887
887
} else {
888
888
Some ( Err ( Error :: AbsoluteLocktimeNotMet ( * n) ) )
889
889
}
890
890
}
891
891
892
892
/// Helper function to evaluate a Older Node. Takes no argument from stack
893
- /// `n CHECKLOCKTIMEVERIFY 0NOTEQUAL` and `n CHECKLOCKTIMEVERIFY `
893
+ /// `n CHECKSEQUENCEVERIFY 0NOTEQUAL` and `n CHECKSEQUENCEVERIFY `
894
894
/// Ideally this should return int value as n: build_scriptint(t as i64)),
895
895
/// The reason we don't need to copy the Script semantics is that
896
896
/// Miniscript never evaluates integers and it is safe to treat them as
@@ -902,7 +902,7 @@ impl<'stack> Stack<'stack> {
902
902
) -> Option < Result < SatisfiedConstraint < ' desc , ' stack > , Error > > {
903
903
if height >= * n {
904
904
self . push ( StackElement :: Satisfied ) ;
905
- Some ( Ok ( SatisfiedConstraint :: AbsoluteTimeLock { time : n } ) )
905
+ Some ( Ok ( SatisfiedConstraint :: RelativeTimeLock { time : n } ) )
906
906
} else {
907
907
Some ( Err ( Error :: RelativeLocktimeNotMet ( * n) ) )
908
908
}
@@ -1183,7 +1183,7 @@ mod tests {
1183
1183
let after_satisfied: Result < Vec < SatisfiedConstraint > , Error > = constraints. collect ( ) ;
1184
1184
assert_eq ! (
1185
1185
after_satisfied. unwrap( ) ,
1186
- vec![ SatisfiedConstraint :: RelativeTimeLock { time: & 1000 } ]
1186
+ vec![ SatisfiedConstraint :: AbsoluteTimeLock { time: & 1000 } ]
1187
1187
) ;
1188
1188
1189
1189
//Check Older
@@ -1192,7 +1192,7 @@ mod tests {
1192
1192
let older_satisfied: Result < Vec < SatisfiedConstraint > , Error > = constraints. collect ( ) ;
1193
1193
assert_eq ! (
1194
1194
older_satisfied. unwrap( ) ,
1195
- vec![ SatisfiedConstraint :: AbsoluteTimeLock { time: & 1000 } ]
1195
+ vec![ SatisfiedConstraint :: RelativeTimeLock { time: & 1000 } ]
1196
1196
) ;
1197
1197
1198
1198
//Check Sha256
0 commit comments