diff options
author | Alex Morcos <morcos@chaincode.com> | 2014-07-25 21:29:54 -0400 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2014-07-28 10:52:54 -0400 |
commit | 961ae93c85cee96c5dca3d44fbfb829243607f65 (patch) | |
tree | abfa7c96a3b0b5c4e399db1ac98601c90ecf4697 /src | |
parent | 17f15678d399275a093be496914c59b463929fe4 (diff) |
Fix minor bug which only affected log messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/txmempool.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 0725441fba..a06de7a947 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -225,6 +225,12 @@ public: seenTxConfirm(feeRate, minRelayFee, dPriority, i); } } + + //After new samples are added, we have to clear the sorted lists, + //so they'll be resorted the next time someone asks for an estimate + sortedFeeSamples.clear(); + sortedPrioritySamples.clear(); + for (size_t i = 0; i < history.size(); i++) { if (history[i].FeeSamples() + history[i].PrioritySamples() > 0) LogPrint("estimatefee", "estimates: for confirming within %d blocks based on %d/%d samples, fee=%s, prio=%g\n", @@ -232,8 +238,6 @@ public: history[i].FeeSamples(), history[i].PrioritySamples(), estimateFee(i+1).ToString(), estimatePriority(i+1)); } - sortedFeeSamples.clear(); - sortedPrioritySamples.clear(); } // Can return CFeeRate(0) if we don't have any data for that many blocks back. nBlocksToConfirm is 1 based. |