aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2016-12-09 15:25:46 -0500
committerAlex Morcos <morcos@chaincode.com>2016-12-09 15:25:46 -0500
commit01fea7a04834b7fd5eca6f3678f56fed13375d1d (patch)
treec221e581b2d1ab970304593a31ed9976eca9d0f2 /src/net_processing.cpp
parent72bf1b3d0962304850a3ef5fe375db4bff1d0a39 (diff)
If we don't allow free txs, always send a fee filter
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 0137108cf0..8520a1050c 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2993,6 +2993,9 @@ bool SendMessages(CNode* pto, CConnman& connman)
if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
!(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) {
CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
+ // If we don't allow free transactions, then we always have a fee filter of at least minRelayTxFee
+ if (GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
+ currentFilter = std::max(currentFilter, ::minRelayTxFee.GetFeePerK());
int64_t timeNow = GetTimeMicros();
if (timeNow > pto->nextSendTimeFeeFilter) {
static CFeeRate default_feerate(DEFAULT_MIN_RELAY_TX_FEE);