From d134fcf988398db490089410284ea64158689df6 Mon Sep 17 00:00:00 2001 From: jahway603 Date: Wed, 15 Mar 2023 23:12:31 -0400 Subject: [PATCH] removed unused function to resolve Issue #273 --- src/wallet/wallet.cpp | 38 -------------------------------------- src/wallet/wallet.h | 1 - 2 files changed, 39 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index faf98f8e2..88ff8c73b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2273,44 +2273,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 (!hashBlock.IsNull()) - { - map::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); - if (mi != pwallet->mapRequestCount.end()) - nRequests = (*mi).second; - } - } - else - { - // Did anyone request this transaction? - map::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 && !hashBlock.IsNull()) - { - map::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; -} // GetAmounts will determine the transparent debits and credits for a given wallet tx. void CWalletTx::GetAmounts(list& listReceived, diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b6ee86a4d..b2d29d3f9 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -606,7 +606,6 @@ public: bool WriteToDisk(CWalletDB *pwalletdb); int64_t GetTxTime() const; - int GetRequestCount() const; bool RelayWalletTransaction();