Struct AccountRevert
pub struct AccountRevert {
pub account: AccountInfoRevert,
pub storage: HashMap<Uint<256, 4>, RevertToSlot, FbBuildHasher<32>>,
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: HashMap<Uint<256, 4>, RevertToSlot, FbBuildHasher<32>>Storage slots to revert.
previous_status: AccountStatusPrevious account status before the change.
wipe_storage: boolWhether to wipe the storage.
Implementations§
§impl AccountRevert
impl AccountRevert
pub 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
pub fn new_selfdestructed_again(
status: AccountStatus,
account: AccountInfoRevert,
previous_storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>,
updated_storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>,
) -> AccountRevert
pub fn new_selfdestructed_again( status: AccountStatus, account: AccountInfoRevert, previous_storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>, updated_storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>, ) -> AccountRevert
Very similar to new_selfdestructed but it will add additional zeros
(RevertToSlot::Destroyed) for the storage that are set if account is again created.
pub fn new_selfdestructed_from_bundle(
account_info_revert: AccountInfoRevert,
bundle_account: &mut BundleAccount,
updated_storage: &HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>,
) -> Option<AccountRevert>
pub fn new_selfdestructed_from_bundle( account_info_revert: AccountInfoRevert, bundle_account: &mut BundleAccount, updated_storage: &HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>, ) -> Option<AccountRevert>
Creates revert for states that were before selfdestruct.
pub fn new_selfdestructed(
status: AccountStatus,
account: AccountInfoRevert,
storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>,
) -> AccountRevert
pub fn new_selfdestructed( status: AccountStatus, account: AccountInfoRevert, storage: HashMap<Uint<256, 4>, StorageSlot, FbBuildHasher<32>>, ) -> AccountRevert
Create new selfdestruct revert.
Trait Implementations§
§impl Clone for AccountRevert
impl Clone for AccountRevert
§fn clone(&self) -> AccountRevert
fn clone(&self) -> AccountRevert
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for AccountRevert
impl Debug for AccountRevert
§impl Default for AccountRevert
impl Default for AccountRevert
§fn default() -> AccountRevert
fn default() -> AccountRevert
§impl<'de> Deserialize<'de> for AccountRevert
impl<'de> Deserialize<'de> for AccountRevert
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountRevert, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountRevert, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for AccountRevert
§impl Ord for AccountRevert
Implements total ordering for AccountRevert
impl Ord for AccountRevert
Implements total ordering for AccountRevert
§fn cmp(&self, other: &AccountRevert) -> Ordering
fn cmp(&self, other: &AccountRevert) -> Ordering
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,
§impl PartialEq for AccountRevert
impl PartialEq for AccountRevert
§impl PartialOrd for AccountRevert
Implements partial ordering for AccountRevert
impl PartialOrd for AccountRevert
Implements partial ordering for AccountRevert
§impl Serialize for AccountRevert
impl Serialize for AccountRevert
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§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>,
Source§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