Fix >= bound when iterating over network upgrades.

This commit is contained in:
therealyingtong 2022-04-07 20:03:46 +08:00
parent 1ab4da3f2c
commit 63c83ad5df
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ namespace Consensus {
}
int Params::HeightOfLatestSettledUpgrade() const {
for (auto idxInt = Consensus::MAX_NETWORK_UPGRADES - 1; idxInt >= Consensus::BASE_SPROUT; idxInt--) {
for (auto idxInt = Consensus::MAX_NETWORK_UPGRADES - 1; idxInt > Consensus::BASE_SPROUT; idxInt--) {
if (vUpgrades[idxInt].hashActivationBlock.has_value()) {
return vUpgrades[idxInt].nActivationHeight;
}