#[non_exhaustive]pub enum WalletEvent {
ChainTipChanged {
old_tip: BlockId,
new_tip: BlockId,
},
TxConfirmed {
txid: Txid,
tx: Arc<Transaction>,
block_time: ConfirmationBlockTime,
old_block_time: Option<ConfirmationBlockTime>,
},
TxUnconfirmed {
txid: Txid,
tx: Arc<Transaction>,
old_block_time: Option<ConfirmationBlockTime>,
},
TxReplaced {
txid: Txid,
tx: Arc<Transaction>,
conflicts: Vec<(usize, Txid)>,
},
TxDropped {
txid: Txid,
tx: Arc<Transaction>,
},
}Expand description
Events representing changes to wallet transactions.
Returned after calling
Wallet::apply_update_events.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ChainTipChanged
The latest chain tip known to the wallet changed.
TxConfirmed
A transaction is now confirmed.
If the transaction was previously unconfirmed old_block_time will be None.
If a confirmed transaction is now re-confirmed in a new block old_block_time will contain
the block id and the time it was previously confirmed. This can happen after a chain
reorg.
Fields
tx: Arc<Transaction>Transaction.
block_time: ConfirmationBlockTimeConfirmation block time.
old_block_time: Option<ConfirmationBlockTime>Old confirmation block and time if previously confirmed in a different block.
TxUnconfirmed
A transaction is now unconfirmed.
If the transaction is first seen in the mempool old_block_time will be None.
If a previously confirmed transaction is now seen in the mempool old_block_time will
contain the block id and the time it was previously confirmed. This can happen after a
chain reorg.
Fields
tx: Arc<Transaction>Transaction.
old_block_time: Option<ConfirmationBlockTime>Old confirmation block and time, if previously confirmed.
TxReplaced
An unconfirmed transaction was replaced.
This can happen after an RBF is broadcast or if a third party double spends an input of a received payment transaction before it is confirmed.
The conflicts field contains the txid and vin (in which it conflicts) of the conflicting transactions.
Fields
tx: Arc<Transaction>Transaction.
TxDropped
Unconfirmed transaction dropped.
The transaction was dropped from the local mempool. This is generally due to the fee rate
being too low. The transaction can still reappear in the mempool in the future resulting in
a WalletEvent::TxUnconfirmed event.
Trait Implementations§
Source§impl Clone for WalletEvent
impl Clone for WalletEvent
Source§fn clone(&self) -> WalletEvent
fn clone(&self) -> WalletEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more