diff options
| author | Gregory Maxwell <[email protected]> | 2015-12-05 15:16:25 -0800 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2015-12-05 15:26:43 -0800 |
| commit | 075faaebf2e534265ff8aca015eaf03a8a156f32 (patch) | |
| tree | 2ad548c53bbc283317737443aba60717e4d177e6 /src/main.cpp | |
| parent | Merge pull request #7170 (diff) | |
| parent | Don't do mempool lookups for "mempool" command without a filter (diff) | |
| download | discoin-075faaebf2e534265ff8aca015eaf03a8a156f32.tar.xz discoin-075faaebf2e534265ff8aca015eaf03a8a156f32.zip | |
Merge pull request #7174
96918a2 Don't do mempool lookups for "mempool" command without a filter (Matt Corallo)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 22e71c0c4..a0e996ae7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4994,12 +4994,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, vector<CInv> vInv; BOOST_FOREACH(uint256& hash, vtxid) { CInv inv(MSG_TX, hash); - 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)) - vInv.push_back(inv); + if (pfrom->pfilter) { + CTransaction tx; + bool fInMemPool = mempool.lookup(hash, tx); + if (!fInMemPool) continue; // another thread removed since queryHashes, maybe... + if (!pfrom->pfilter->IsRelevantAndUpdate(tx)) continue; + } + vInv.push_back(inv); if (vInv.size() == MAX_INV_SZ) { pfrom->PushMessage("inv", vInv); vInv.clear(); |