diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-16 19:32:51 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-16 19:33:08 +0100 |
commit | dd98f045382428f450dc917a3933c9e4e8e1ba99 (patch) | |
tree | 3dcc0f69a886c8eb4fee8378447ca4a15031b22d /src/txmempool.cpp | |
parent | 8a445c5651edb9a1f51497055b7ddf4402be9188 (diff) | |
parent | eb30d1a5b215c6dd3763d7f7948f2dd8cb61f6bf (diff) |
Merge #9380: Separate different uses of minimum fees
eb30d1a Introduce -dustrelayfee (Alex Morcos)
7b1add3 Introduce -incrementalrelayfee (Alex Morcos)
daec955 Introduce -blockmintxfee (Alex Morcos)
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 373687430b..5b085f492d 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -359,7 +359,6 @@ CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) : nCheckFrequency = 0; minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee); - minReasonableRelayFee = _minReasonableRelayFee; } CTxMemPool::~CTxMemPool() @@ -1076,12 +1075,12 @@ CFeeRate CTxMemPool::GetMinFee(size_t sizelimit) const { rollingMinimumFeeRate = rollingMinimumFeeRate / pow(2.0, (time - lastRollingFeeUpdate) / halflife); lastRollingFeeUpdate = time; - if (rollingMinimumFeeRate < (double)minReasonableRelayFee.GetFeePerK() / 2) { + if (rollingMinimumFeeRate < (double)incrementalRelayFee.GetFeePerK() / 2) { rollingMinimumFeeRate = 0; return CFeeRate(0); } } - return std::max(CFeeRate(rollingMinimumFeeRate), minReasonableRelayFee); + return std::max(CFeeRate(rollingMinimumFeeRate), incrementalRelayFee); } void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) { @@ -1105,7 +1104,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe // to have 0 fee). This way, we don't allow txn to enter mempool with feerate // equal to txn which were removed with no block in between. CFeeRate removed(it->GetModFeesWithDescendants(), it->GetSizeWithDescendants()); - removed += minReasonableRelayFee; + removed += incrementalRelayFee; trackPackageRemoved(removed); maxFeeRateRemoved = std::max(maxFeeRateRemoved, removed); |