Skip to content

Commit 756374c

Browse files
committed
Merge #9313: If we don't allow free txs, always send a fee filter
01fea7a If we don't allow free txs, always send a fee filter (Alex Morcos)
2 parents c6fd923 + 01fea7a commit 756374c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/net_processing.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,6 +2995,9 @@ bool SendMessages(CNode* pto, CConnman& connman)
29952995
if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
29962996
!(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) {
29972997
CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
2998+
// If we don't allow free transactions, then we always have a fee filter of at least minRelayTxFee
2999+
if (GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
3000+
currentFilter = std::max(currentFilter, ::minRelayTxFee.GetFeePerK());
29983001
int64_t timeNow = GetTimeMicros();
29993002
if (timeNow > pto->nextSendTimeFeeFilter) {
30003003
static CFeeRate default_feerate(DEFAULT_MIN_RELAY_TX_FEE);

0 commit comments

Comments
 (0)