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§
sourcefn write_state_reverts(
&self,
reverts: PlainStateReverts,
first_block: BlockNumber,
) -> ProviderResult<()>
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.
sourcefn write_state_changes(&self, changes: StateChangeset) -> ProviderResult<()>
fn write_state_changes(&self, changes: StateChangeset) -> ProviderResult<()>
Write state changes to the database.
sourcefn write_hashed_state(
&self,
hashed_state: &HashedPostStateSorted,
) -> ProviderResult<()>
fn write_hashed_state( &self, hashed_state: &HashedPostStateSorted, ) -> ProviderResult<()>
Writes the hashed state changes to the database