diff options
| author | Pieter Wuille <[email protected]> | 2016-06-18 18:16:36 +0200 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-06-19 01:34:57 -0700 |
| commit | 96806c39f4ef395975c0cd7d654dcb71c4790be2 (patch) | |
| tree | 0f5570a2bb4d8de5e5b20b79653b6d10f366b84a /src/txmempool.cpp | |
| parent | Merge #8215: [wallet] tests: Don't use floating point (diff) | |
| download | discoin-96806c39f4ef395975c0cd7d654dcb71c4790be2.tar.xz discoin-96806c39f4ef395975c0cd7d654dcb71c4790be2.zip | |
Stop trimming when mapTx is empty
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 |