Fix stale comment in CTxMemPool::TrimToSize.
This commit is contained in:
parent
2bc50187ee
commit
58254aa3bc
1 changed files with 4 additions and 4 deletions
|
@ -903,10 +903,10 @@ void CTxMemPool::TrimToSize(size_t sizelimit) {
|
||||||
while (DynamicMemoryUsage() > sizelimit) {
|
while (DynamicMemoryUsage() > sizelimit) {
|
||||||
indexed_transaction_set::nth_index<1>::type::iterator it = mapTx.get<1>().begin();
|
indexed_transaction_set::nth_index<1>::type::iterator it = mapTx.get<1>().begin();
|
||||||
|
|
||||||
// We set the new mempool min fee to either the feerate of the removed set,
|
// We set the new mempool min fee to the feerate of the removed set, plus the
|
||||||
// or the "minimum reasonable fee rate" (ie some value under which we consider
|
// "minimum reasonable fee rate" (ie some value under which we consider txn
|
||||||
// txn to have 0 fee). This way, if the mempool reaches its full size on free
|
// to have 0 fee). This way, we don't allow txn to enter mempool with feerate
|
||||||
// txn, we will simply disable free txn until there is a block, and some time.
|
// equal to txn which were removed with no block in between.
|
||||||
CFeeRate removed(it->GetFeesWithDescendants(), it->GetSizeWithDescendants());
|
CFeeRate removed(it->GetFeesWithDescendants(), it->GetSizeWithDescendants());
|
||||||
removed += minReasonableRelayFee;
|
removed += minReasonableRelayFee;
|
||||||
trackPackageRemoved(removed);
|
trackPackageRemoved(removed);
|
||||||
|
|
Loading…
Reference in a new issue