/// Helper function to evaluate a Older Node. Takes no argument from stack
/// `n CHECKSEQUENCEVERIFY 0NOTEQUAL` and `n CHECKSEQUENCEVERIFY`
/// 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 Older Node. Takes no argument from stack
`n CHECKSEQUENCEVERIFY 0NOTEQUAL` and `n CHECKSEQUENCEVERIFY`
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 Older Node . Takes no argument from stack ` n CHECKSEQUENCEVERIFY 0NOTEQUAL ` and ` n CHECKSEQUENCEVERIFY ` 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_older<'intp>(
        &mut self,
        n: &'intp u32,
        height: u32,
    ) -> Option<Result<SatisfiedConstraint<'intp, 'txin>, Error>> {
        if height >= *n {
            self.push(Element::Satisfied);
            Some(Ok(SatisfiedConstraint::RelativeTimeLock { time: n }))
        } else {
            Some(Err(Error::RelativeLocktimeNotMet(*n)))
        }
    }
pub fn evaluate_older < ' intp > ( & mut self , n : & ' intp u32 , height : u32 , ) -> Option < Result < SatisfiedConstraint < ' intp , ' txin > , Error > > { if height >= * n { self . push ( Element :: Satisfied ) ; Some ( Ok ( SatisfiedConstraint :: RelativeTimeLock { time : n } ) ) } else { Some ( Err ( Error :: RelativeLocktimeNotMet ( * n ) ) ) } }
Helper function to evaluate a Older Node.
Helper function to evaluate a Older Node .
&mut self
n
&'intp u32
height
u32