Trait reth_provider::StateChangeWriter

source ·
pub trait StateChangeWriter {
    // Required methods
    fn write_state_reverts(
        &self,
        reverts: PlainStateReverts,
        first_block: BlockNumber,
    ) -> ProviderResult<()>;
    fn write_state_changes(&self, changes: StateChangeset) -> ProviderResult<()>;
    fn write_hashed_state(
        &self,
        hashed_state: &HashedPostStateSorted,
    ) -> ProviderResult<()>;
}
Expand description

A trait specifically for writing state changes or reverts

Required Methods§

source

fn write_state_reverts( &self, reverts: PlainStateReverts, first_block: BlockNumber, ) -> ProviderResult<()>

Write state reverts to the database.

NOTE: Reverts will delete all wiped storage from plain state.

source

fn write_state_changes(&self, changes: StateChangeset) -> ProviderResult<()>

Write state changes to the database.

source

fn write_hashed_state( &self, hashed_state: &HashedPostStateSorted, ) -> ProviderResult<()>

Writes the hashed state changes to the database

Implementors§

source§

impl<TX: DbTxMut + DbTx> StateChangeWriter for DatabaseProvider<TX>