Optimization: don't check the mempool at all if no mempool req ever
(cherry picked from commit bitcoin/bitcoin@e9b4780b29)
This commit is contained in:
parent
b9fdf44d43
commit
138c768542
|
@ -6145,7 +6145,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||||
if (mi != mapRelay.end() && !IsExpiringSoonTx(*mi->second, currentHeight + 1)) {
|
if (mi != mapRelay.end() && !IsExpiringSoonTx(*mi->second, currentHeight + 1)) {
|
||||||
pfrom->PushMessage("tx", *mi->second);
|
pfrom->PushMessage("tx", *mi->second);
|
||||||
push = true;
|
push = true;
|
||||||
} else {
|
} else if (pfrom->timeLastMempoolReq) {
|
||||||
auto txinfo = mempool.info(inv.hash);
|
auto txinfo = mempool.info(inv.hash);
|
||||||
// To protect privacy, do not answer getdata using the mempool when
|
// To protect privacy, do not answer getdata using the mempool when
|
||||||
// that TX couldn't have been INVed in reply to a MEMPOOL request.
|
// that TX couldn't have been INVed in reply to a MEMPOOL request.
|
||||||
|
|
Loading…
Reference in New Issue