reth::rpc::server_types::eth

Type Alias StateCacheDb

pub type StateCacheDb<'a> = CacheDB<StateProviderDatabase<StateProviderTraitObjWrapper<'a>>>;
Expand description

Helper alias type for the state’s CacheDB

Aliased Type§

struct StateCacheDb<'a> {
    pub accounts: HashMap<Address, DbAccount, RandomState>,
    pub contracts: HashMap<FixedBytes<32>, Bytecode, RandomState>,
    pub logs: Vec<Log>,
    pub block_hashes: HashMap<Uint<256, 4>, FixedBytes<32>, RandomState>,
    pub db: StateProviderDatabase<StateProviderTraitObjWrapper<'a>>,
}

Fields§

§accounts: HashMap<Address, DbAccount, RandomState>

Account info where None means it is not existing. Not existing state is needed for Pre TANGERINE forks. code is always None, and bytecode can be found in contracts.

§contracts: HashMap<FixedBytes<32>, Bytecode, RandomState>

Tracks all contracts by their code hash.

§logs: Vec<Log>

All logs that were committed via DatabaseCommit::commit.

§block_hashes: HashMap<Uint<256, 4>, FixedBytes<32>, RandomState>

All cached block hashes from the DatabaseRef.

§db: StateProviderDatabase<StateProviderTraitObjWrapper<'a>>

The underlying database (DatabaseRef) that is used to load data.

Note: this is read-only, data is never written to this database.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 160 bytes