Files
triangles_v5/src
Krystie 16224898d4 wallet: add abandontransaction RPC + Qt right-click 'Abandon transaction'
Brings back the abandontransaction RPC that was removed when Triangles
forked from Bitcoin Core 0.18. The fix for a stuck or conflicted
transaction is currently to either wait indefinitely for the conflict
to resolve or restart the wallet with -zapwallettxes=1 (a heavy hammer
that wipes ALL unconfirmed txs). abandontransaction gives the user
targeted control.

Backend (port of Bitcoin Core 0.17's CWallet::AbandonTransaction):
  - CWallet::AbandonTransaction(const uint256& hashTx) in src/wallet.{h,cpp}
    Erases the tx from the wallet and the wallet DB, which releases
    the inputs (vfSpent was tracked on the wtx). Iterates the wallet
    to record descendant txs that spend this tx's outputs.
  - abandontransaction RPC in src/rpcwallet.cpp + trianglesrpc.{h,cpp}.
    Validates the tx is unconfirmed, in-wallet, and from this wallet
    before calling AbandonTransaction.
  - extern forward declaration in trianglesrpc.h so the RPC table can
    reference the function.

UI (Qt right-click context menu in transactionview.cpp):
  - New 'Abandon transaction' action in the context menu, only enabled
    for transactions with Unconfirmed / Conflicted / Offline status.
  - Confirmation dialog before calling the RPC.
  - On success, refreshes the transactions table.

WalletModel::abandonTransaction(QString) in src/qt/walletmodel.{h,cpp}
is the thin wrapper that converts the QString hash to a uint256 and
calls CWallet::AbandonTransaction.

Tested by: building a Linux daemon + a successful regtest-style dry-run
that confirmed the new RPC is registered and the symbol is in the
binary. UI rebuild on Windows requires running build-all.yml on a
windows-latest runner (done via workflow_dispatch).
2026-06-24 19:03:15 -07:00
..
2014-10-05 23:37:30 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2026-05-10 02:33:40 -07:00
2014-07-21 20:07:07 -07:00
2015-07-28 15:59:06 +02:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-07-16 16:05:09 -07:00
2014-10-05 23:37:30 +02:00