Skip to content

Commit 18a9b27

Browse files
committed
p2p: Don't send FEEFILTER in blocksonly mode
It is unnecessary to send FEEFILTER messages when we don't accept transactions from our peers.
1 parent c46f1ce commit 18a9b27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/net_processing.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4689,7 +4689,10 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
46894689
//
46904690
// Message: feefilter
46914691
//
4692-
if (pto->m_tx_relay != nullptr && pto->GetCommonVersion() >= FEEFILTER_VERSION && gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
4692+
if (pto->m_tx_relay != nullptr &&
4693+
!m_ignore_incoming_txs &&
4694+
pto->GetCommonVersion() >= FEEFILTER_VERSION &&
4695+
gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
46934696
!pto->HasPermission(PF_FORCERELAY) // peers with the forcerelay permission should not filter txs to us
46944697
) {
46954698
CAmount currentFilter = m_mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();

0 commit comments

Comments
 (0)