diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-16 17:09:31 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-16 17:09:47 +0100 |
commit | 8c7947e09ff854cacd9461f268b90edf3f6e6e55 (patch) | |
tree | 5636be5cc36b57a5154b515f7623914e91282d19 | |
parent | c9e00591cd3fce7b7cf20730922d45991ce9aece (diff) | |
parent | fa16b8fdbaecdce7db007c9f558e2b7e4027524f (diff) |
Merge #9367: If we don't allow free txs, always send a fee filter (take 2)
fa16b8f If we don't allow free txs, always send a fee filter (take 2) (MarcoFalke)
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index ef2670f517..a4e5ad2095 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2995,14 +2995,14 @@ 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); static FeeFilterRounder filterRounder(default_feerate); CAmount filterToSend = filterRounder.round(currentFilter); + // If we don't allow free transactions, then we always have a fee filter of at least minRelayTxFee + if (GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0) + filterToSend = std::max(filterToSend, ::minRelayTxFee.GetFeePerK()); if (filterToSend != pto->lastSentFeeFilter) { connman.PushMessage(pto, msgMaker.Make(NetMsgType::FEEFILTER, filterToSend)); pto->lastSentFeeFilter = filterToSend; |