diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-06-20 15:21:21 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-06-20 15:21:27 +0200 |
| commit | 1f86d64f6d87b46ee80c6d66b0c3c01c5095aaea (patch) | |
| tree | b18c865874a466a2a99cee8eb97b390353e92a50 /src/txmempool.cpp | |
| parent | Merge #8179: Evict orphans which are included or precluded by accepted blocks. (diff) | |
| parent | Stop trimming when mapTx is empty (diff) | |
| download | discoin-1f86d64f6d87b46ee80c6d66b0c3c01c5095aaea.tar.xz discoin-1f86d64f6d87b46ee80c6d66b0c3c01c5095aaea.zip | |
Merge #8220: Stop trimming when mapTx is empty
ad0752e Stop trimming when mapTx is empty (Pieter Wuille)
Diffstat (limited to 'src/txmempool.cpp')
| -rw-r--r-- | src/txmempool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 205ffd637..18c54b08b 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -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 |