pub enum TxStatus {
Success,
InvalidSignature,
InvalidNonce,
InsufficientBalance,
InvalidChainId,
Failed(u32),
}Expand description
Status of a transaction after execution
Variants§
Success
Transaction executed successfully
InvalidSignature
Transaction failed - invalid signature
InvalidNonce
Transaction failed - wrong nonce
InsufficientBalance
Transaction failed - insufficient balance
InvalidChainId
Transaction failed - invalid chain ID
Failed(u32)
Transaction failed - other reason
Implementations§
Source§impl TxStatus
impl TxStatus
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if transaction succeeded
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Get a human-readable description.
Failed(u32) codes are mapped here so chain_getTransactionStatus
(and any other receipt-surfacing path) emits the specific reason.
Allocated codes:
22— V2RegisterEncryptionKey: rejected a low/small-order X25519 public key. Validation lives insumchain_crypto::is_low_order_x25519_public_key(separate crate;sumchain-primitivesdoes not depend onsumchain-crypto, so this is a plain reference rather than an intra-doc link).
Allocated codes (kept in sync with executor dispatch):
20— V2 NodeRegistry dispatch failed (generic) — falls through to"failed"until per-op reasons are added.21— V2 StorageMetadata dispatch failed (generic) — falls through.22—RegisterEncryptionKeyrejected a low/small-order X25519 public key. Seesumchain_crypto::is_low_order_x25519_public_key.30—RegisterFilePendingV2validity failure (size/chunk caps, visibility/bundle/owner rules, recipient X25519 missing, collision).31—AbandonFileV2validity failure (state/owner/grace).32— V2 storage op accepted by the dispatcher but not yet implemented in the current checkpoint (placeholder for 1c stubs).33—AcceptAssignmentV2validity failure (file state, snapshot membership, per-tx cap, index range, index-not-assigned).34—ActivateFileV2validity failure (state/owner/incomplete chunk coverage).35—AddAccessV2/RemoveAccessV2/UpdateAccessV2validity failure (file state/owner/visibility-bundle/X25519/duplicate/missing/ byte-cap).40— V2 storage protocol not enabled at this block height. Setv2_enabled_from_heightin the chain’s genesis to opt in. Distinct from validity codes 30–35: this is a chain-level gate rejection, no fee consumed; safe to retry after activation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TxStatus
impl<'de> Deserialize<'de> for TxStatus
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for TxStatus
impl Eq for TxStatus
impl StructuralPartialEq for TxStatus
Auto Trait Implementations§
impl Freeze for TxStatus
impl RefUnwindSafe for TxStatus
impl Send for TxStatus
impl Sync for TxStatus
impl Unpin for TxStatus
impl UnsafeUnpin for TxStatus
impl UnwindSafe for TxStatus
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
Mutably borrows from an owned value. Read more