Fix negative height issues for pruning cheat lists

This commit is contained in:
miketout
2018-10-11 14:23:14 -07:00
parent 16ef4f1e3d
commit 1021455845
8 changed files with 28 additions and 22 deletions

View File

@@ -38,6 +38,10 @@ UpgradeState NetworkUpgradeState(
const Consensus::Params& params,
Consensus::UpgradeIndex idx)
{
if (nHeight < 0)
{
printf("height: %d", nHeight);
}
assert(nHeight >= 0);
assert(idx >= Consensus::BASE_SPROUT && idx < Consensus::MAX_NETWORK_UPGRADES);
auto nActivationHeight = params.vUpgrades[idx].nActivationHeight;