mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Don't do mempool lookups for "mempool" command without a filter
Github-Pull: #7174
Rebased-From: 96918a2f09
This commit is contained in:
parent
f31955d9da
commit
82aff880d3
@ -4994,11 +4994,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
vector<CInv> vInv;
|
||||
BOOST_FOREACH(uint256& hash, vtxid) {
|
||||
CInv inv(MSG_TX, hash);
|
||||
if (pfrom->pfilter) {
|
||||
CTransaction tx;
|
||||
bool fInMemPool = mempool.lookup(hash, tx);
|
||||
if (!fInMemPool) continue; // another thread removed since queryHashes, maybe...
|
||||
if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(tx)) ||
|
||||
(!pfrom->pfilter))
|
||||
if (!pfrom->pfilter->IsRelevantAndUpdate(tx)) continue;
|
||||
}
|
||||
vInv.push_back(inv);
|
||||
if (vInv.size() == MAX_INV_SZ) {
|
||||
pfrom->PushMessage("inv", vInv);
|
||||
|
Loading…
Reference in New Issue
Block a user