pub fn on_block_end(
        &self,
        storage: &mut Storage,
        block_number: BlockNumber,
        now: u64,
    ) -> Result<ExecSideEffects, ExecError> {
        if let Some(selector) = self.hooks.on_block_end {
            let mut input_data = vec![];
            selector.to_be_bytes().encode_to(&mut input_data);

            let (result, effects) = self.unchecked_bare_call(
                storage,
                AccountId::new(Default::default()),
                input_data,
                false,
                block_number,
                now,
            );
            let _ = transpose_contract_result(&result)?;
            Ok(effects)
        } else {
            Ok(Default::default())
        }
    }
/// Called by on each block end by the runtime
Called by on each block end by the runtime
Called by on each block end by the runtime
pub fn on_block_end(
        &self,
        storage: &mut Storage,
        block_number: BlockNumber,
        now: u64,
    ) -> Result<ExecSideEffects, ExecError> {
        if let Some(selector) = self.hooks.on_block_end {
            let mut input_data = vec![];
            selector.to_be_bytes().encode_to(&mut input_data);
            let (result, effects) = self.unchecked_bare_call(
                storage,
                AccountId::new(Default::default()),
                input_data,
                false,
                block_number,
                now,
            );
            let _ = transpose_contract_result(&result)?;
            Ok(effects)
        } else {
            Ok(Default::default())
        }
    }
pub fn on_block_end ( & self , storage : & mut Storage , block_number : BlockNumber , now : u64 , ) -> Result < ExecSideEffects , ExecError > { if let Some ( selector ) = self . hooks . on_block_end { let mut input_data = vec ! [ ] ; selector . to_be_bytes ( ) . encode_to ( & mut input_data ) ; let ( result , effects ) = self . unchecked_bare_call ( storage , AccountId :: new ( Default :: default ( ) ) , input_data , false , block_number , now , ) ; let _ = transpose_contract_result ( & result ) ? ; Ok ( effects ) } else { Ok ( Default :: default ( ) ) } }
Called by on each block end by the runtime
Called by on each block end by the runtime
&self
storage
&mut Storage
block_number
BlockNumber
now
u64
&self
storage
&mut Storage
block_number
BlockNumber
now
u64