Explicitly assert that chainActive[upgrade.nActivationHeight] is non-null at this point.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
a76e568800
commit
cb7c90522d
|
@ -1859,6 +1859,10 @@ bool IsInitialBlockDownload(const CChainParams& chainParams)
|
|||
_("We are on a chain with sufficient work, but an expected network upgrade has not activated. Your node may be under attack! Shutting down for safety."));
|
||||
return true;
|
||||
}
|
||||
|
||||
// If an upgrade is active, we must be past its activation height.
|
||||
assert(chainActive[upgrade.nActivationHeight]);
|
||||
|
||||
if (chainActive[upgrade.nActivationHeight]->GetBlockHash() != upgrade.hashActivationBlock.get()) {
|
||||
AbortNode(
|
||||
strprintf(
|
||||
|
|
Loading…
Reference in New Issue