Skip to content

Commit

Permalink
Stop trimming when mapTx is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa authored and TheBlueMatt committed Jun 19, 2016
1 parent a072d1a commit 96806c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/txmempool.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 96806c3

Please sign in to comment.