pub fn verify(
        &self,
        ledger_info: &LedgerInfo,
        version: Version,
        sender: AccountAddress,
        sequence_number: u64,
    ) -> Result<()> {
        ensure!(
            self.version == version,
            "Version ({}) is not expected ({}).",
            self.version,
            version,
        );
        ensure!(
            self.signed_transaction.sender() == sender,
            "Sender ({}) not expected ({}).",
            self.signed_transaction.sender(),
            sender,
        );
        ensure!(
            self.signed_transaction.sequence_number() == sequence_number,
            "Sequence number ({}) not expected ({}).",
            self.signed_transaction.sequence_number(),
            sequence_number,
        );

        let events_root_hash = self.events.as_ref().map(|events| {
            let event_hashes: Vec<_> = events.iter().map(ContractEvent::hash).collect();
            get_accumulator_root_hash::<EventAccumulatorHasher>(&event_hashes)
        });
        verify_signed_transaction(
            ledger_info,
            self.signed_transaction.hash(),
            events_root_hash,
            version,
            &self.proof,
        )
    }
/// Verifies the signed transaction with the proof, both carried by `self`.
///
/// Two things are ensured if no error is raised:
///   1. This signed transaction exists in the ledger represented by `ledger_info`.
///   2. And this signed transaction has the same `version`, `sender`, and `sequence_number` as
/// indicated by the parameter list. If any of these parameter is unknown to the call site that
/// is supposed to be informed via this struct, get it from the struct itself, such as:
/// `signed_txn_with_proof.version`, `signed_txn_with_proof.signed_transaction.sender()`, etc.
Verifies the signed transaction with the proof, both carried by `self`.
Two things are ensured if no error is raised:
1. This signed transaction exists in the ledger represented by `ledger_info`.
2.
Verifies the signed transaction with the proof both carried by ` self ` . Two things are ensured if no error is raised : 1 . This signed transaction exists in the ledger represented by ` ledger_info ` . 2 .
pub fn verify(
        &self,
        ledger_info: &LedgerInfo,
        version: Version,
        sender: AccountAddress,
        sequence_number: u64,
    ) -> Result<()> {
        ensure!(
            self.version == version,
            "Version ({}) is not expected ({}).",
            self.version,
            version,
        );
        ensure!(
            self.signed_transaction.sender() == sender,
            "Sender ({}) not expected ({}).",
            self.signed_transaction.sender(),
            sender,
        );
        ensure!(
            self.signed_transaction.sequence_number() == sequence_number,
            "Sequence number ({}) not expected ({}).",
            self.signed_transaction.sequence_number(),
            sequence_number,
        );
        let events_root_hash = self.events.as_ref().map(|events| {
            let event_hashes: Vec<_> = events.iter().map(ContractEvent::hash).collect();
            get_accumulator_root_hash::<EventAccumulatorHasher>(&event_hashes)
        });
        verify_signed_transaction(
            ledger_info,
            self.signed_transaction.hash(),
            events_root_hash,
            version,
            &self.proof,
        )
    }
pub fn verify ( & self , ledger_info : & LedgerInfo , version : Version , sender : AccountAddress , sequence_number : u64 , ) -> Result < ( ) > { ensure ! ( self version version " " self version version ) ; ensure ! ( self signed_transaction sender ( ) sender " " self signed_transaction sender ( ) sender ) ; ensure ! ( self signed_transaction sequence_number ( ) sequence_number " " self signed_transaction sequence_number ( ) sequence_number ) ; let events_root_hash = self . events . as_ref ( ) . map ( | events | { let event_hashes : Vec < _ > = events . iter ( ) . map ( ContractEvent :: hash ) . collect ( ) ; get_accumulator_root_hash :: < EventAccumulatorHasher > ( & event_hashes ) } ) ; verify_signed_transaction ( ledger_info , self . signed_transaction . hash ( ) , events_root_hash , version , & self . proof , ) }
Verifies the signed transaction with the proof, both carried by `self`.
Verifies the signed transaction with the proof both carried by ` self ` .
&self
ledger_info
&LedgerInfo
version
Version
sender
AccountAddress
sequence_number
u64