/// Helper function to evaluate a After Node. Takes no argument from stack
/// `n CHECKLOCKTIMEVERIFY 0NOTEQUAL` and `n CHECKLOCKTIMEVERIFY`
/// Ideally this should return int value as n: build_scriptint(t as i64)),
/// The reason we don't need to copy the Script semantics is that
/// Miniscript never evaluates integers and it is safe to treat them as
/// booleans
Helper function to evaluate a After Node. Takes no argument from stack
`n CHECKLOCKTIMEVERIFY 0NOTEQUAL` and `n CHECKLOCKTIMEVERIFY`
Ideally this should return int value as n: build_scriptint(t as i64)),
The reason we don't need to copy the Script semantics is that
Miniscript never evaluates integers and it is safe to treat them as
booleans
Helper function to evaluate a After Node . Takes no argument from stack ` n CHECKLOCKTIMEVERIFY 0NOTEQUAL ` and ` n CHECKLOCKTIMEVERIFY ` Ideally this should return int value as n : build_scriptint ( t as i64 )) The reason we don ' t need to copy the Script semantics is that Miniscript never evaluates integers and it is safe to treat them as booleans
pub fn evaluate_after<'intp>(
        &mut self,
        n: &'intp u32,
        age: u32,
    ) -> Option<Result<SatisfiedConstraint<'intp, 'txin>, Error>> {
        if age >= *n {
            self.push(Element::Satisfied);
            Some(Ok(SatisfiedConstraint::AbsoluteTimeLock { time: n }))
        } else {
            Some(Err(Error::AbsoluteLocktimeNotMet(*n)))
        }
    }
pub fn evaluate_after < ' intp > ( & mut self , n : & ' intp u32 , age : u32 , ) -> Option < Result < SatisfiedConstraint < ' intp , ' txin > , Error > > { if age >= * n { self . push ( Element :: Satisfied ) ; Some ( Ok ( SatisfiedConstraint :: AbsoluteTimeLock { time : n } ) ) } else { Some ( Err ( Error :: AbsoluteLocktimeNotMet ( * n ) ) ) } }
Helper function to evaluate a After Node.
Helper function to evaluate a After Node .
&mut self
n
&'intp u32
age
u32