Skip to content

Commit e9b4780

Browse files
committed
Optimization: don't check the mempool at all if no mempool req ever
1 parent dbfb426 commit e9b4780

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4516,7 +4516,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
45164516
if (mi != mapRelay.end()) {
45174517
pfrom->PushMessage(NetMsgType::TX, *mi->second);
45184518
push = true;
4519-
} else {
4519+
} else if (pfrom->timeLastMempoolReq) {
45204520
auto txinfo = mempool.info(inv.hash);
45214521
// To protect privacy, do not answer getdata using the mempool when
45224522
// that TX couldn't have been INVed in reply to a MEMPOOL request.

0 commit comments

Comments
 (0)