pub trait StateChangeWriter {
// Required methods
fn write_state_reverts(
&self,
reverts: PlainStateReverts,
first_block: u64,
) -> Result<(), ProviderError>;
fn write_state_changes(
&self,
changes: StateChangeset,
) -> Result<(), ProviderError>;
fn write_hashed_state(
&self,
hashed_state: &HashedPostStateSorted,
) -> Result<(), ProviderError>;
fn remove_state(
&self,
range: RangeInclusive<u64>,
) -> Result<(), ProviderError>;
fn take_state(
&self,
range: RangeInclusive<u64>,
) -> Result<ExecutionOutcome, ProviderError>;
}
Expand description
A trait specifically for writing state changes or reverts
Required Methods§
Sourcefn write_state_reverts(
&self,
reverts: PlainStateReverts,
first_block: u64,
) -> Result<(), ProviderError>
fn write_state_reverts( &self, reverts: PlainStateReverts, first_block: u64, ) -> Result<(), ProviderError>
Write state reverts to the database.
NOTE: Reverts will delete all wiped storage from plain state.
Sourcefn write_state_changes(
&self,
changes: StateChangeset,
) -> Result<(), ProviderError>
fn write_state_changes( &self, changes: StateChangeset, ) -> Result<(), ProviderError>
Write state changes to the database.
Sourcefn write_hashed_state(
&self,
hashed_state: &HashedPostStateSorted,
) -> Result<(), ProviderError>
fn write_hashed_state( &self, hashed_state: &HashedPostStateSorted, ) -> Result<(), ProviderError>
Writes the hashed state changes to the database
Sourcefn remove_state(&self, range: RangeInclusive<u64>) -> Result<(), ProviderError>
fn remove_state(&self, range: RangeInclusive<u64>) -> Result<(), ProviderError>
Remove the block range of state.
Sourcefn take_state(
&self,
range: RangeInclusive<u64>,
) -> Result<ExecutionOutcome, ProviderError>
fn take_state( &self, range: RangeInclusive<u64>, ) -> Result<ExecutionOutcome, ProviderError>
Take the block range of state, recreating the ExecutionOutcome
.