pub enum StateChangeCause {
NotWritableToDisk,
InitialState,
TransactionProcessing {
tx_hash: CryptoHash,
},
ActionReceiptProcessingStarted {
receipt_hash: CryptoHash,
},
ActionReceiptGasReward {
receipt_hash: CryptoHash,
},
ReceiptProcessing {
receipt_hash: CryptoHash,
},
PostponedReceipt {
receipt_hash: CryptoHash,
},
UpdatedDelayedReceipts,
ValidatorAccountsUpdate,
Migration,
Resharding,
}Expand description
A structure used to index state changes due to transaction/receipt processing and other things.
Variants§
NotWritableToDisk
A type of update that does not get finalized. Used for verification and execution of
immutable smart contract methods. Attempt fo finalize a TrieUpdate containing such
change will lead to panic.
InitialState
A type of update that is used to mark the initial storage update, e.g. during genesis or in tests setup.
TransactionProcessing
Processing of a transaction.
Fields
tx_hash: CryptoHashActionReceiptProcessingStarted
Before the receipt is going to be processed, inputs get drained from the state, which causes state modification.
Fields
receipt_hash: CryptoHashActionReceiptGasReward
Computation of gas reward.
Fields
receipt_hash: CryptoHashReceiptProcessing
Processing of a receipt.
Fields
receipt_hash: CryptoHashPostponedReceipt
The given receipt was postponed. This is either a data receipt or an action receipt.
A DataReceipt can be postponed if the corresponding ActionReceipt is not received yet,
or other data dependencies are not satisfied.
An ActionReceipt can be postponed if not all data dependencies are received.
Fields
receipt_hash: CryptoHashUpdatedDelayedReceipts
Updated delayed receipts queue in the state. We either processed previously delayed receipts or added more receipts to the delayed queue.
ValidatorAccountsUpdate
State change that happens when we update validator accounts. Not associated with with any specific transaction or receipt.
Migration
State change that is happens due to migration that happens in first block of an epoch after protocol upgrade
Resharding
State changes for building states for re-sharding
Trait Implementations§
Source§impl BorshDeserialize for StateChangeCause
impl BorshDeserialize for StateChangeCause
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for StateChangeCause
impl BorshSerialize for StateChangeCause
Source§impl Clone for StateChangeCause
impl Clone for StateChangeCause
Source§fn clone(&self) -> StateChangeCause
fn clone(&self) -> StateChangeCause
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StateChangeCause
impl Debug for StateChangeCause
Source§impl EnumExt for StateChangeCause
impl EnumExt for StateChangeCause
Source§impl From<StateChangeCause> for StateChangeCauseView
impl From<StateChangeCause> for StateChangeCauseView
Source§fn from(state_change_cause: StateChangeCause) -> Self
fn from(state_change_cause: StateChangeCause) -> Self
Source§impl PartialEq for StateChangeCause
impl PartialEq for StateChangeCause
impl StructuralPartialEq for StateChangeCause
Auto Trait Implementations§
impl Freeze for StateChangeCause
impl RefUnwindSafe for StateChangeCause
impl Send for StateChangeCause
impl Sync for StateChangeCause
impl Unpin for StateChangeCause
impl UnwindSafe for StateChangeCause
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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 more