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<()>;
fn remove_state(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<()>;
fn take_state(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<ExecutionOutcome>;
}
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
Sourcefn remove_state(&self, range: RangeInclusive<BlockNumber>) -> ProviderResult<()>
fn remove_state(&self, range: RangeInclusive<BlockNumber>) -> ProviderResult<()>
Remove the block range of state.
Sourcefn take_state(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<ExecutionOutcome>
fn take_state( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<ExecutionOutcome>
Take the block range of state, recreating the ExecutionOutcome
.