/// Helper function to evaluate a RipeMd160 Node.
/// `SIZE 32 EQUALVERIFY RIPEMD160 h EQUAL`
Helper function to evaluate a RipeMd160 Node.
`SIZE 32 EQUALVERIFY RIPEMD160 h EQUAL`
Helper function to evaluate a RipeMd160 Node . ` SIZE 32 EQUALVERIFY RIPEMD160 h EQUAL `
pub fn evaluate_ripemd160<'intp>(
        &mut self,
        hash: &'intp ripemd160::Hash,
    ) -> Option<Result<SatisfiedConstraint<'intp, 'txin>, Error>> {
        if let Some(Element::Push(preimage)) = self.pop() {
            if preimage.len() != 32 {
                return Some(Err(Error::HashPreimageLengthMismatch));
            }
            if ripemd160::Hash::hash(preimage) == *hash {
                self.push(Element::Satisfied);
                Some(Ok(SatisfiedConstraint::HashLock {
                    hash: HashLockType::Ripemd160(hash),
                    preimage,
                }))
            } else {
                self.push(Element::Dissatisfied);
                None
            }
        } else {
            Some(Err(Error::UnexpectedStackEnd))
        }
    }
pub fn evaluate_ripemd160 < ' intp > ( & mut self , hash : & ' intp ripemd160 :: Hash , ) -> Option < Result < SatisfiedConstraint < ' intp , ' txin > , Error > > { if let Some ( Element :: Push ( preimage ) ) = self . pop ( ) { if preimage . len ( ) != 32 { return Some ( Err ( Error :: HashPreimageLengthMismatch ) ) ; } if ripemd160 :: Hash :: hash ( preimage ) == * hash { self . push ( Element :: Satisfied ) ; Some ( Ok ( SatisfiedConstraint :: HashLock { hash : HashLockType :: Ripemd160 ( hash ) , preimage , } ) ) } else { self . push ( Element :: Dissatisfied ) ; None } } else { Some ( Err ( Error :: UnexpectedStackEnd ) ) } }
Helper function to evaluate a RipeMd160 Node.
Helper function to evaluate a RipeMd160 Node .
&mut self
hash
&'intp ripemd160::Hash