Skip to content

Commit

Permalink
Merge bitcoin#16952: gui: make sure to update the UI when deleting a …
Browse files Browse the repository at this point in the history
…transaction

addaf8a make sure to update the UI when deleting a transaction (Jonas Schnelli)

Pull request description:

  `CWallet::ZapSelectTx` removes transactions from the internal model, but leaves the UI in the dark.
  Adding a `NotifyTransactionChanged()` should avoid having invalid transactions in the GUI.

  Fixes bitcoin#16950

ACKs for top commit:
  fanquake:
    ACK addaf8a - tested that this fixes bitcoin#16950
  Sjors:
    tACK addaf8a: tested with an unpruned wallet by calling `removeprunedfunds` on an RBF-replaced transaction. It neatly disappears from the UI.
  kristapsk:
    ACK addaf8a (tested both with and without this change)

Tree-SHA512: 65e8c690847f7499e82c9fef67b60d9aaa63c853732fe7fa7281da33054fcdcd9d24f5b86de71b0827728c25bac8efb7db445863f990304ebfee6fc450620c47
  • Loading branch information
laanwj committed Oct 2, 2019
2 parents ddc4e3c + addaf8a commit 8d39c63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3376,6 +3376,7 @@ DBErrors CWallet::ZapSelectTx(std::vector<uint256>& vHashIn, std::vector<uint256
const auto& it = mapWallet.find(hash);
wtxOrdered.erase(it->second.m_it_wtxOrdered);
mapWallet.erase(it);
NotifyTransactionChanged(this, hash, CT_DELETED);
}

if (nZapSelectTxRet == DBErrors::NEED_REWRITE)
Expand Down

0 comments on commit 8d39c63

Please sign in to comment.