diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -17,12 +17,8 @@ * Return positive answer if transaction should be shown in list. */ bool TransactionRecord::showTransaction(const CWalletTx &wtx) { - if (wtx.IsCoinBase()) { - // Ensures we show generated coins / mined transactions at depth 1 - if (!wtx.IsInMainChain()) { - return false; - } - } + // There are currently no cases where we hide transactions, but we may want + // to use this in the future for things like RBF. return true; } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -654,10 +654,6 @@ */ bool AddWatchOnly(const CScript &dest) override; - // Used to NotifyTransactionChanged of the previous block's coinbase when - // the next block comes in - uint256 hashPrevBestCoinbase; - public: /* * Main wallet lock. diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1308,35 +1308,6 @@ for (size_t i = 0; i < pblock->vtx.size(); i++) { SyncTransaction(pblock->vtx[i], pindex, i); } - - // The GUI expects a NotifyTransactionChanged when a coinbase tx - // which is in our wallet moves from in-the-best-block to - // 2-confirmations (as it only displays them at that time). - // We do that here. - if (hashPrevBestCoinbase.IsNull()) { - // Immediately after restart we have no idea what the coinbase - // transaction from the previous block is. - // For correctness we scan over the entire wallet, looking for - // the previous block's coinbase, just in case it is ours, so - // that we can notify the UI that it should now be displayed. - if (pindex->pprev) { - for (const std::pair &p : mapWallet) { - if (p.second.IsCoinBase() && - p.second.hashBlock == pindex->pprev->GetBlockHash()) { - NotifyTransactionChanged(this, p.first, CT_UPDATED); - break; - } - } - } - } else { - std::map::const_iterator mi = - mapWallet.find(hashPrevBestCoinbase); - if (mi != mapWallet.end()) { - NotifyTransactionChanged(this, hashPrevBestCoinbase, CT_UPDATED); - } - } - - hashPrevBestCoinbase = pblock->vtx[0]->GetHash(); } void CWallet::BlockDisconnected(const std::shared_ptr &pblock) {