evmc_get_block_hash_fn

Type Alias evmc_get_block_hash_fn 

Source
pub type evmc_get_block_hash_fn = Option<unsafe extern "C" fn(context: *mut evmc_host_context, number: i64) -> evmc_bytes32>;
Expand description

Get block hash callback function.

This callback function is used by a VM to query the hash of the header of the given block. If the information about the requested block is not available, then this is signalled by returning null bytes.

@param context The pointer to the Host execution context. @param number The block number. @return The block hash or null bytes if the information about the block is not available.

Aliased Type§

pub enum evmc_get_block_hash_fn {
    None,
    Some(unsafe extern "C" fn(*mut evmc_host_context, i64) -> evmc_bytes32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut evmc_host_context, i64) -> evmc_bytes32)

Some value of type T.