[#wallet-CWalletTx-Update] = xref:wallet.adoc[wallet]::xref:wallet/CWalletTx.adoc[CWalletTx]::Update :relfileprefix: ../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool Update( xref:CTransactionRef.adoc[CTransactionRef] tx, xref:wallet/TxState.adoc[TxState] const& new_state); ---- == Return Value True if the stored transaction, state, or canonical wtxid changed. == Parameters [cols="1,4"] |=== | Name| Description | *tx* | The transaction to record, which may carry a different wtxid. | *new_state* | The state to apply to this wallet transaction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#