Trait DatabaseCommitExt
pub trait DatabaseCommitExt: Database + DatabaseCommit {
// Provided methods
fn increment_balances(
&mut self,
balances: impl IntoIterator<Item = (Address, u128)>,
) -> Result<(), Self::Error> { ... }
fn drain_balances(
&mut self,
addresses: impl IntoIterator<Item = Address>,
) -> Result<Vec<u128>, Self::Error> { ... }
}Expand description
EVM database commit interface.
Provided Methods§
fn increment_balances(
&mut self,
balances: impl IntoIterator<Item = (Address, u128)>,
) -> Result<(), Self::Error>
fn increment_balances( &mut self, balances: impl IntoIterator<Item = (Address, u128)>, ) -> Result<(), Self::Error>
Iterates over received balances and increment all account balances.
Update will create transitions for all accounts that are updated.
fn drain_balances(
&mut self,
addresses: impl IntoIterator<Item = Address>,
) -> Result<Vec<u128>, Self::Error>
fn drain_balances( &mut self, addresses: impl IntoIterator<Item = Address>, ) -> Result<Vec<u128>, Self::Error>
Drains balances from given account and return those values.
It is used for DAO hardfork state change to move values from given accounts.
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.