#[non_exhaustive]pub struct TxUpdate<A = ()> {
pub txs: Vec<Arc<Transaction>>,
pub txouts: BTreeMap<OutPoint, TxOut>,
pub anchors: BTreeSet<(A, Txid)>,
pub seen_ats: HashSet<(Txid, u64)>,
pub evicted_ats: HashSet<(Txid, u64)>,
}Expand description
Data object used to communicate updates about relevant transactions from some chain data source
to the core model (usually a bdk_chain::TxGraph).
use bdk_core::TxUpdate;
let mut tx_update = TxUpdate::default();
tx_update.txs.push(tx);
tx_update.anchors.insert((anchor, txid));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.txs: Vec<Arc<Transaction>>Full transactions. These are transactions that were determined to be relevant to the wallet given the request.
txouts: BTreeMap<OutPoint, TxOut>Floating txouts. These are TxOuts that exist but the whole transaction wasn’t included in
txs since only knowing about the output is important. These are often used to help
determine the fee of a wallet transaction.
anchors: BTreeSet<(A, Txid)>Transaction anchors. Anchors tells us a position in the chain where a transaction was confirmed.
seen_ats: HashSet<(Txid, u64)>When transactions were seen in the mempool.
An unconfirmed transaction can only be canonical with a seen_at value. It is the
responsibility of the chain-source to include the seen_at values for unconfirmed
(unanchored) transactions.
FullScanRequest::start_time or
SyncRequest::start_time can be used to
provide the seen_at value.
evicted_ats: HashSet<(Txid, u64)>When transactions were discovered to be missing (evicted) from the mempool.
SyncRequest::start_time can be used to
provide the evicted_at value.