Trait reth_trie_db::DatabaseStorageRoot

source ·
pub trait DatabaseStorageRoot<'a, TX> {
    // Required methods
    fn from_tx(tx: &'a TX, address: Address) -> Self;
    fn from_tx_hashed(tx: &'a TX, hashed_address: B256) -> Self;
    fn overlay_root(
        tx: &'a TX,
        address: Address,
        hashed_storage: HashedStorage,
    ) -> Result<B256, StorageRootError>;
}
Expand description

Extends [StorageRoot] with operations specific for working with a database transaction.

Required Methods§

source

fn from_tx(tx: &'a TX, address: Address) -> Self

Create a new storage root calculator from database transaction and raw address.

source

fn from_tx_hashed(tx: &'a TX, hashed_address: B256) -> Self

Create a new storage root calculator from database transaction and hashed address.

source

fn overlay_root( tx: &'a TX, address: Address, hashed_storage: HashedStorage, ) -> Result<B256, StorageRootError>

Calculates the storage root for this [HashedStorage] and returns it.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, TX: DbTx> DatabaseStorageRoot<'a, TX> for StorageRoot<DatabaseTrieCursorFactory<'a, TX>, DatabaseHashedCursorFactory<'a, TX>>

source§

fn from_tx(tx: &'a TX, address: Address) -> Self

source§

fn from_tx_hashed(tx: &'a TX, hashed_address: B256) -> Self

source§

fn overlay_root( tx: &'a TX, address: Address, hashed_storage: HashedStorage, ) -> Result<B256, StorageRootError>

Implementors§