Browse Source

Fixed a bug with index bounds checking

0.10
Alex Morcos 10 years ago
parent
commit
17f15678d3
  1. 2
      src/txmempool.cpp

2
src/txmempool.cpp

@ -299,7 +299,7 @@ public: @@ -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];
}

Loading…
Cancel
Save