Do not use mempool for GETDATA for tx accepted after the last mempoolreq
This commit is contained in:
committed by
lateminer
parent
c41eb3a831
commit
16b0e12385
@@ -801,15 +801,23 @@ void CTxMemPool::queryHashes(vector<uint256>& vtxid)
|
||||
std::sort(vtxid.begin(), vtxid.end(), DepthAndScoreComparator(this));
|
||||
}
|
||||
|
||||
bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
|
||||
|
||||
bool CTxMemPool::lookup(uint256 hash, CTransaction& result, int64_t& time) const
|
||||
{
|
||||
LOCK(cs);
|
||||
indexed_transaction_set::const_iterator i = mapTx.find(hash);
|
||||
if (i == mapTx.end()) return false;
|
||||
result = i->GetTx();
|
||||
time = i->GetTime();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
|
||||
{
|
||||
int64_t time;
|
||||
return CTxMemPool::lookup(hash, result, time);
|
||||
}
|
||||
|
||||
bool CTxMemPool::lookupFeeRate(const uint256& hash, CFeeRate& feeRate) const
|
||||
{
|
||||
LOCK(cs);
|
||||
|
||||
Reference in New Issue
Block a user