DatabaseHashedPostState

Trait DatabaseHashedPostState 

Source
pub trait DatabaseHashedPostState<TX>: Sized {
    // Required method
    fn from_reverts<KH: KeyHasher>(
        tx: &TX,
        range: impl RangeBounds<BlockNumber>,
    ) -> Result<Self, DatabaseError>;
}
Expand description

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

Required Methods§

Source

fn from_reverts<KH: KeyHasher>( tx: &TX, range: impl RangeBounds<BlockNumber>, ) -> Result<Self, DatabaseError>

Initializes [HashedPostState] from reverts. Iterates over state reverts in the specified range and aggregates them into hashed state in reverse.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<TX: DbTx> DatabaseHashedPostState<TX> for HashedPostState

Source§

fn from_reverts<KH: KeyHasher>( tx: &TX, range: impl RangeBounds<BlockNumber>, ) -> Result<Self, DatabaseError>

Implementors§