Enum unc_primitives::types::StateChangeCause
source · 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
Fields
tx_hash: CryptoHashProcessing of a transaction.
ActionReceiptProcessingStarted
Fields
receipt_hash: CryptoHashBefore the receipt is going to be processed, inputs get drained from the state, which causes state modification.
ActionReceiptGasReward
Fields
receipt_hash: CryptoHashComputation of gas reward.
ReceiptProcessing
Fields
receipt_hash: CryptoHashProcessing of a receipt.
PostponedReceipt
Fields
receipt_hash: CryptoHashThe 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.
UpdatedDelayedReceipts
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
source§fn eq(&self, other: &StateChangeCause) -> bool
fn eq(&self, other: &StateChangeCause) -> bool
self and other values to be equal, and is used
by ==.