mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-23 04:16:52 +02:00
Add assertion
Enforce the invariant that the existence of an end-of-grace-period implies the existence of an activation hash.
This commit is contained in:
@@ -618,7 +618,9 @@ static UniValue HardForkMajorityDesc(int minVersion, CBlockIndex* pindex, int nR
|
||||
// Always report blocks found as over the threshold once the fork is active
|
||||
nFound = nRequired + 1;
|
||||
gracePeriodEnds = static_cast<uint64_t>(forkTime);
|
||||
triggeredAtBlock = pblocktree->ForkBitActivated(FORK_BIT_2MB).GetHex();
|
||||
uint256 activationHash = pblocktree->ForkBitActivated(FORK_BIT_2MB);
|
||||
assert(activationHash != uint256());
|
||||
triggeredAtBlock = activationHash.GetHex();
|
||||
} else {
|
||||
for (int i = 0; i < consensusParams.nMajorityWindow && pstart != NULL; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user