aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-29 11:56:42 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-03-29 11:56:47 +0200
commit4399dc81420f5a106bc34384b837bbd9aba7ddef (patch)
treeb54b8daef2aa8c59e0e83336d59c127b55d2410f /src
parentcf11f9c22ff42c62598c753eda790275616d1c50 (diff)
parentbeead33a21483c4901e76799ba5c8f7d6fdfffe9 (diff)
downloadbitcoin-4399dc81420f5a106bc34384b837bbd9aba7ddef.tar.xz
Merge #21509: p2p: Don't send FEEFILTER in blocksonly mode.
beead33a21483c4901e76799ba5c8f7d6fdfffe9 [test] no send feefilters when txrelay is turned off (glozow) 18a9b27dd68dc9044a82fba0802b8cb5c68d10ce p2p: Don't send FEEFILTER in blocksonly mode (Martin Zumsande) Pull request description: The purpose of FEEFILTER messages (BIP 133) is to inform our peers that we do not want transactions below a specified fee rate. In blocksonly mode, we do not want our peer to send us any transactions at all (and will disconnect if a peer still sends a transaction INV or TX).  Therefore, I don't think that it makes sense to send FEEFILTER messages every 10 minutes on average in blocksonly mode - this PR disables it. Note that on block-relay-only connections, FEEFILTER is already disabled, just not in blocksonly mode. ACKs for top commit: glozow: re ACK beead33a21483c4901e76799ba5c8f7d6fdfffe9 🙂 thanks for adding the test! amitiuttarwar: reACK beead33a21483c4901e76799ba5c8f7d6fdfffe9 MarcoFalke: review ACK beead33a21483c4901e76799ba5c8f7d6fdfffe9 jnewbery: reACK beead33a21483c4901e76799ba5c8f7d6fdfffe9 Tree-SHA512: e748cd52fe23d647fa49008b020389956ac508e16ce9fd108d8afb773bff95788298ae229162bd70215d7246fc25c796484966dc05890b0b4ef601f9cd35628b
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index e561f02c4a..d327a69a93 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -4689,7 +4689,10 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
//
// Message: feefilter
//
- if (pto->m_tx_relay != nullptr && pto->GetCommonVersion() >= FEEFILTER_VERSION && gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
+ if (pto->m_tx_relay != nullptr &&
+ !m_ignore_incoming_txs &&
+ pto->GetCommonVersion() >= FEEFILTER_VERSION &&
+ gArgs.GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
!pto->HasPermission(PF_FORCERELAY) // peers with the forcerelay permission should not filter txs to us
) {
CAmount currentFilter = m_mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();