Skip to main content

DatabaseStorageRoot

Trait 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: FixedBytes<32>) -> Self;
    fn overlay_root(
        tx: &'a TX,
        address: Address,
        hashed_storage: HashedStorage,
    ) -> Result<FixedBytes<32>, StorageRootError>;
}
Available on crate features trie-db and trie only.
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: FixedBytes<32>) -> 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<FixedBytes<32>, StorageRootError>

Calculates the storage root for this HashedStorage and returns it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§