Remove unused GetRequestCount()
This commit is contained in:
@@ -2273,45 +2273,6 @@ int64_t CWalletTx::GetTxTime() const
|
|||||||
return n ? n : nTimeReceived;
|
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<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock);
|
|
||||||
if (mi != pwallet->mapRequestCount.end())
|
|
||||||
nRequests = (*mi).second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Did anyone request this transaction?
|
|
||||||
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 && !hashBlock.IsNull())
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetAmounts will determine the transparent debits and credits for a given wallet tx.
|
// GetAmounts will determine the transparent debits and credits for a given wallet tx.
|
||||||
void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
|
void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
|
||||||
list<COutputEntry>& listSent, CAmount& nFee, string& strSentAccount, const isminefilter& filter) const
|
list<COutputEntry>& listSent, CAmount& nFee, string& strSentAccount, const isminefilter& filter) const
|
||||||
|
|||||||
@@ -606,7 +606,6 @@ public:
|
|||||||
bool WriteToDisk(CWalletDB *pwalletdb);
|
bool WriteToDisk(CWalletDB *pwalletdb);
|
||||||
|
|
||||||
int64_t GetTxTime() const;
|
int64_t GetTxTime() const;
|
||||||
int GetRequestCount() const;
|
|
||||||
|
|
||||||
bool RelayWalletTransaction();
|
bool RelayWalletTransaction();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user