Browse Source

Merge #8220: Stop trimming when mapTx is empty

ad0752e Stop trimming when mapTx is empty (Pieter Wuille)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
1f86d64f6d
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/txmempool.cpp

2
src/txmempool.cpp

@ -1075,7 +1075,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe @@ -1075,7 +1075,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe
unsigned nTxnRemoved = 0;
CFeeRate maxFeeRateRemoved(0);
while (DynamicMemoryUsage() > sizelimit) {
while (!mapTx.empty() && DynamicMemoryUsage() > sizelimit) {
indexed_transaction_set::index<descendant_score>::type::iterator it = mapTx.get<descendant_score>().begin();
// We set the new mempool min fee to the feerate of the removed set, plus the

Loading…
Cancel
Save