mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
p2p: Don't send FEEFILTER in blocksonly mode
It is unnecessary to send FEEFILTER messages when we don't accept transactions from our peers.
This commit is contained in:
parent
c46f1ce751
commit
18a9b27dd6
1 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue