From 138c7685424ef1a1014fc238700d1f0ef0b2b0ad Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 31 May 2016 20:34:27 +0200 Subject: [PATCH] Optimization: don't check the mempool at all if no mempool req ever (cherry picked from commit bitcoin/bitcoin@e9b4780b292122fd727426471f025ec3d3eb7b08) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 7a8f312a1..c9c9896e7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6145,7 +6145,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam if (mi != mapRelay.end() && !IsExpiringSoonTx(*mi->second, currentHeight + 1)) { pfrom->PushMessage("tx", *mi->second); push = true; - } else { + } else if (pfrom->timeLastMempoolReq) { auto txinfo = mempool.info(inv.hash); // To protect privacy, do not answer getdata using the mempool when // that TX couldn't have been INVed in reply to a MEMPOOL request.