pub struct AccountRevert {
pub account: AccountInfoRevert,
pub storage: U256Map<RevertToSlot>,
pub previous_status: AccountStatus,
pub wipe_storage: bool,
}Expand description
Assumption is that Revert can return full state from any future state to any past state.
§Note
It is created when new account state is applied to old account state.
And it is used to revert new account state to the old account state.
AccountRevert is structured in this way as we need to save it inside database.
And we need to be able to read it from database.
Fields§
§account: AccountInfoRevertAccount information revert.
storage: U256Map<RevertToSlot>Storage slots to revert.
previous_status: AccountStatusPrevious account status before the change.
wipe_storage: boolWhether to wipe the storage.
Implementations§
Source§impl AccountRevert
impl AccountRevert
Sourcepub fn size_hint(&self) -> usize
pub fn size_hint(&self) -> usize
The approximate size of changes needed to store this account revert.
1 + storage_reverts_len
Sourcepub fn new_selfdestructed_again(
status: AccountStatus,
account: AccountInfoRevert,
previous_storage: StorageWithOriginalValues,
updated_storage: StorageWithOriginalValues,
) -> Self
pub fn new_selfdestructed_again( status: AccountStatus, account: AccountInfoRevert, previous_storage: StorageWithOriginalValues, updated_storage: StorageWithOriginalValues, ) -> Self
Very similar to new_selfdestructed but it will add additional zeros
(RevertToSlot::Destroyed) for the storage that are set if account is again created.
Sourcepub fn new_selfdestructed_from_bundle(
account_info_revert: AccountInfoRevert,
bundle_account: &mut BundleAccount,
updated_storage: &StorageWithOriginalValues,
) -> Option<Self>
pub fn new_selfdestructed_from_bundle( account_info_revert: AccountInfoRevert, bundle_account: &mut BundleAccount, updated_storage: &StorageWithOriginalValues, ) -> Option<Self>
Creates revert for states that were before selfdestruct.
Sourcepub fn new_selfdestructed(
status: AccountStatus,
account: AccountInfoRevert,
storage: StorageWithOriginalValues,
) -> Self
pub fn new_selfdestructed( status: AccountStatus, account: AccountInfoRevert, storage: StorageWithOriginalValues, ) -> Self
Create new selfdestruct revert.
Trait Implementations§
Source§impl Clone for AccountRevert
impl Clone for AccountRevert
Source§impl Debug for AccountRevert
impl Debug for AccountRevert
Source§impl Default for AccountRevert
impl Default for AccountRevert
Source§impl<'de> Deserialize<'de> for AccountRevert
Available on crate feature serde only.
impl<'de> Deserialize<'de> for AccountRevert
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AccountRevert
Source§impl Ord for AccountRevert
Implements total ordering for AccountRevert
impl Ord for AccountRevert
Implements total ordering for AccountRevert
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AccountRevert
impl PartialEq for AccountRevert
Source§impl PartialOrd for AccountRevert
Implements partial ordering for AccountRevert
impl PartialOrd for AccountRevert
Implements partial ordering for AccountRevert
Source§impl Serialize for AccountRevert
Available on crate feature serde only.
impl Serialize for AccountRevert
serde only.impl StructuralPartialEq for AccountRevert
Auto Trait Implementations§
impl Freeze for AccountRevert
impl RefUnwindSafe for AccountRevert
impl Send for AccountRevert
impl Sync for AccountRevert
impl Unpin for AccountRevert
impl UnsafeUnpin for AccountRevert
impl UnwindSafe for AccountRevert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 144 bytes