aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2018-07-09 20:06:39 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-07-12 09:49:41 -0400
commitc04a4a5ae97915fce1c35dff715e373b1290a169 (patch)
treebcd209fa8c7a9293409226ef1c1a383cca9c881d /src/wallet
parentdac5374ccee6b21605127a6f8000666aab5caecc (diff)
downloadbitcoin-c04a4a5ae97915fce1c35dff715e373b1290a169.tar.xz
Remove useless mapRequest tracking that just effects Qt display.
I thought we had removed this a long time ago, TBH, its really confusing feedback to users that we display whether a tx was broadcast to immediate neighbor nodes, given that has little indication of whether the tx propagated very far. Github-Pull: #13622 Rebased-From: beef7ec4be725beea870a2da510d2817487601ec
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp42
-rw-r--r--src/wallet/wallet.h12
2 files changed, 0 insertions, 54 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 468d704111..b4d76e5f91 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1506,45 +1506,6 @@ int64_t CWalletTx::GetTxTime() const
return n ? n : nTimeReceived;
}
-int CWalletTx::GetRequestCount() const
-{
- // Returns -1 if it wasn't being tracked
- int nRequests = -1;
- {
- LOCK(pwallet->cs_wallet);
- if (IsCoinBase())
- {
- // Generated block
- if (!hashUnset())
- {
- std::map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock);
- if (mi != pwallet->mapRequestCount.end())
- nRequests = (*mi).second;
- }
- }
- else
- {
- // Did anyone request this transaction?
- std::map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(GetHash());
- if (mi != pwallet->mapRequestCount.end())
- {
- nRequests = (*mi).second;
-
- // How about the block it's in?
- if (nRequests == 0 && !hashUnset())
- {
- std::map<uint256, int>::const_iterator _mi = pwallet->mapRequestCount.find(hashBlock);
- if (_mi != pwallet->mapRequestCount.end())
- nRequests = (*_mi).second;
- else
- nRequests = 1; // If it's in someone else's block it must have got out
- }
- }
- }
- }
- return nRequests;
-}
-
void CWalletTx::GetAmounts(std::list<COutputEntry>& listReceived,
std::list<COutputEntry>& listSent, CAmount& nFee, std::string& strSentAccount, const isminefilter& filter) const
{
@@ -3085,9 +3046,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
}
}
- // Track how many getdata requests our transaction gets
- mapRequestCount[wtxNew.GetHash()] = 0;
-
// Get the inserted-CWalletTx from mapWallet so that the
// fInMempool flag is cached properly
CWalletTx& wtx = mapWallet[wtxNew.GetHash()];
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index faee047aa6..9f777b8f03 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -478,7 +478,6 @@ public:
bool IsTrusted() const;
int64_t GetTxTime() const;
- int GetRequestCount() const;
// RelayWalletTransaction may only be called if fBroadcastTransactions!
bool RelayWalletTransaction(CConnman* connman);
@@ -834,7 +833,6 @@ public:
int64_t nOrderPosNext;
uint64_t nAccountingEntryNumber;
- std::map<uint256, int> mapRequestCount;
std::map<CTxDestination, CAddressBookData> mapAddressBook;
@@ -1043,16 +1041,6 @@ public:
const std::string& GetAccountName(const CScript& scriptPubKey) const;
- void Inventory(const uint256 &hash) override
- {
- {
- LOCK(cs_wallet);
- std::map<uint256, int>::iterator mi = mapRequestCount.find(hash);
- if (mi != mapRequestCount.end())
- (*mi).second++;
- }
- }
-
void GetScriptForMining(std::shared_ptr<CReserveScript> &script);
unsigned int GetKeyPoolSize()