mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
Fixed a bug with index bounds checking
This commit is contained in:
parent
3955c3940e
commit
17f15678d3
@ -299,7 +299,7 @@ public:
|
|||||||
size_t nPrevSize = 0;
|
size_t nPrevSize = 0;
|
||||||
for (int i = 0; i < nBlocksToConfirm; i++)
|
for (int i = 0; i < nBlocksToConfirm; i++)
|
||||||
nPrevSize += history.at(i).PrioritySamples();
|
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];
|
return sortedPrioritySamples[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user