aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-04-19 11:14:21 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-04-19 11:15:06 +0200
commite96486cbebc6347e75a1a75e183ee1dabdec7729 (patch)
treea84c699a2e5620fa4f709e27175161c3be26956f /src/wallet
parent64c45aada7029121b7a590aa5f6d01d064ca9a9b (diff)
parent608bbccfb97e5ecb9083ac203642524a6e556e48 (diff)
downloadbitcoin-e96486cbebc6347e75a1a75e183ee1dabdec7729.tar.xz
Merge #10221: Stop treating coinbase outputs differently in GUI: show them at 1conf
608bbcc [qt] Stop treating coinbase outputs differently: show them at 1conf (Matt Corallo) Tree-SHA512: 62ba10520da8b83cf8e97c86dec3ccdcca8b7bfae0174d1a4099d33aa5d11933cc7c248394bf67c2b105211cf7931955816c741957832e703211030c7f4f002f
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp27
-rw-r--r--src/wallet/wallet.h4
2 files changed, 0 insertions, 31 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 10073f7e6d..5f82860e70 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1155,33 +1155,6 @@ void CWallet::BlockConnected(const std::shared_ptr<const CBlock>& pblock, const
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<uint256, CWalletTx>& p : mapWallet) {
- if (p.second.IsCoinBase() && p.second.hashBlock == pindex->pprev->GetBlockHash()) {
- NotifyTransactionChanged(this, p.first, CT_UPDATED);
- break;
- }
- }
- }
- } else {
- std::map<uint256, CWalletTx>::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<const CBlock>& pblock) {
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index b3483f8308..06e7e14990 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -715,10 +715,6 @@ private:
*/
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.