Skip to main content

DynVmDatabase

Type Alias DynVmDatabase 

Source
pub type DynVmDatabase = Box<dyn VmDatabase + Send + Sync + 'static>;

Aliased Type§

pub struct DynVmDatabase(/* private fields */);

Trait Implementations§

Source§

impl Database for DynVmDatabase

Source§

fn get_account_state( &self, address: CoreAddress, ) -> Result<AccountState, DatabaseError>

Source§

fn get_storage_value( &self, address: CoreAddress, key: CoreH256, ) -> Result<U256, DatabaseError>

Source§

fn get_block_hash(&self, block_number: u64) -> Result<CoreH256, DatabaseError>

Source§

fn get_chain_config(&self) -> Result<ChainConfig, DatabaseError>

Source§

fn get_account_code(&self, code_hash: CoreH256) -> Result<Code, DatabaseError>

Source§

fn get_code_metadata( &self, code_hash: CoreH256, ) -> Result<CodeMetadata, DatabaseError>

Source§

fn precompile_cache(&self) -> Option<&PrecompileCache>

Access the precompile cache, if available at this database layer.
Source§

fn prefetch_accounts(&self, addresses: &[H160]) -> Result<(), DatabaseError>

Prefetch a batch of accounts into the cache. Default: sequential fallback.
Source§

fn prefetch_storage(&self, keys: &[(H160, H256)]) -> Result<(), DatabaseError>

Prefetch a batch of storage slots into the cache. Default: sequential fallback.