From 17f15678d399275a093be496914c59b463929fe4 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Fri, 25 Jul 2014 21:21:10 -0400 Subject: [PATCH] Fixed a bug with index bounds checking --- src/txmempool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 164e2741a..0725441fb 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -299,7 +299,7 @@ public: size_t nPrevSize = 0; for (int i = 0; i < nBlocksToConfirm; i++) nPrevSize += history.at(i).PrioritySamples(); - size_t index = min(nPrevSize + nBucketSize/2, sortedFeeSamples.size()-1); + size_t index = min(nPrevSize + nBucketSize/2, sortedPrioritySamples.size()-1); return sortedPrioritySamples[index]; }