pub fn verify_tx(&self, tx: &TransactionView, max_cycles: u64) -> Result<Cycle, CKBError> {
        let consensus = {
            let hardfork_switch = HardForkSwitch::new_without_any_enabled()
                .as_builder()
                .rfc_0032(200)
                .build()
                .unwrap();
            ConsensusBuilder::default()
                .hardfork_switch(hardfork_switch)
                .build()
        };
        let tx_env = {
            let epoch = EpochNumberWithFraction::new(300, 0, 1);
            let header = HeaderView::new_advanced_builder()
                .epoch(epoch.pack())
                .build();
            TxVerifyEnv::new_commit(&header)
        };
        self.verify_tx_by_context(tx, max_cycles, &consensus, &tx_env)
    }
/// Verify the transaction in CKB-VM
///
/// This method use a default verify context with:
///   - use HardForkSwitch to set `rfc_0032` field to 200 (means enable VM selection feature after epoch 200)
///   - use TxVerifyEnv to set currently transaction `epoch` number to 300
Verify the transaction in CKB-VM
This method use a default verify context with:
use HardForkSwitch to set `rfc_0032` field to 200 (means enable VM selection feature after epoch 200)
use TxVerifyEnv to set currently transaction `epoch` number to 300
Verify the transaction in CKB - VM This method use a default verify context with : use HardForkSwitch to set ` rfc_0032 ` field to 200 ( means enable VM selection feature after epoch 200 ) use TxVerifyEnv to set currently transaction ` epoch ` number to 300
pub fn verify_tx(&self, tx: &TransactionView, max_cycles: u64) -> Result<Cycle, CKBError> {
        let consensus = {
            let hardfork_switch = HardForkSwitch::new_without_any_enabled()
                .as_builder()
                .rfc_0032(200)
                .build()
                .unwrap();
            ConsensusBuilder::default()
                .hardfork_switch(hardfork_switch)
                .build()
        };
        let tx_env = {
            let epoch = EpochNumberWithFraction::new(300, 0, 1);
            let header = HeaderView::new_advanced_builder()
                .epoch(epoch.pack())
                .build();
            TxVerifyEnv::new_commit(&header)
        };
        self.verify_tx_by_context(tx, max_cycles, &consensus, &tx_env)
    }
pub fn verify_tx ( & self , tx : & TransactionView , max_cycles : u64 ) -> Result < Cycle , CKBError > { let consensus = { let hardfork_switch = HardForkSwitch :: new_without_any_enabled ( ) . as_builder ( ) . rfc_0032 ( 200 ) . build ( ) . unwrap ( ) ; ConsensusBuilder :: default ( ) . hardfork_switch ( hardfork_switch ) . build ( ) } ; let tx_env = { let epoch = EpochNumberWithFraction :: new ( 300 , 0 , 1 ) ; let header = HeaderView :: new_advanced_builder ( ) . epoch ( epoch . pack ( ) ) . build ( ) ; TxVerifyEnv :: new_commit ( & header ) } ; self . verify_tx_by_context ( tx , max_cycles , & consensus , & tx_env ) }
Verify the transaction in CKB-VM
This method use a default verify context with:
 use HardForkSwitch to set `rfc_0032` field to 200 (means enable VM selection feature after epoch 200)
 use TxVerifyEnv to set currently transaction `epoch` number to 300
Verify the transaction in CKB - VM This method use a default verify context with : use HardForkSwitch to set ` rfc_0032 ` field to 200 ( means enable VM selection feature after epoch 200 ) use TxVerifyEnv to set currently transaction ` epoch ` number to 300
&self
tx
&TransactionView
max_cycles
u64
&self
tx
&TransactionView
max_cycles
u64