pub enum TxStatus {
    Unconfirmed,
    Acknowledged {
        peer: SocketAddr,
    },
    Confirmed {
        height: u64,
        block: BlockHash,
    },
    Reverted,
    Stale {
        replaced_by: Txid,
        block: BlockHash,
    },
}
Expand description

Transaction status of a given transaction.

Variants

Unconfirmed

This is the initial state of a transaction after it has been announced by the client.

Acknowledged

Fields

peer: SocketAddr

Peer acknowledging the transaction.

Transaction was acknowledged by a peer.

This is the case when a peer requests the transaction data from us after an inventory announcement. It does not mean the transaction is considered valid by the peer.

Confirmed

Fields

height: u64

Height at which it was included.

block: BlockHash

Hash of the block in which it was included.

Transaction was included in a block. This event is fired after a block from the main chain is scanned.

Reverted

A transaction that was previously confirmed, and is now reverted due to a re-org. Note that this event can only fire if the originally confirmed tx is still in memory.

Stale

Fields

replaced_by: Txid

Transaction replacing the given transaction and causing it to be stale.

block: BlockHash

Block of the included transaction.

Transaction was replaced by another transaction, and will probably never be included in a block. This can happen if an RBF transaction is replaced by one with a higher fee, or if a transaction is reverted and a conflicting transaction replaces it. In this case it would be preceded by a TxStatus::Reverted status.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.