Fix >= bound when iterating over network upgrades.
This commit is contained in:
parent
1ab4da3f2c
commit
63c83ad5df
|
@ -26,7 +26,7 @@ namespace Consensus {
|
||||||
}
|
}
|
||||||
|
|
||||||
int Params::HeightOfLatestSettledUpgrade() const {
|
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()) {
|
if (vUpgrades[idxInt].hashActivationBlock.has_value()) {
|
||||||
return vUpgrades[idxInt].nActivationHeight;
|
return vUpgrades[idxInt].nActivationHeight;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue