wallet::CWalletTx::Update

Update the state of this wallet transaction along with a transaction that may have a different wtxid. If the given transaction has a different wtxid, the transaction is stored if it has not been seen before. The canonical wtxid is also updated. The tx that is confirmed becomes canonical. For unconfirmed txs, those with witnesses are preferred, followed by least weight.

Synopsis

Declared in <wallet/transaction.h>

bool
Update(
    CTransactionRef tx,
    TxState const& new_state);

Return Value

True if the stored transaction, state, or canonical wtxid changed.

Parameters

NameDescription
txThe transaction to record, which may carry a different wtxid.
new_stateThe state to apply to this wallet transaction.