-Static assert

This commit is contained in:
jl777
2019-01-09 01:43:10 -11:00
parent 1f46aa58e6
commit ba1b2b5c56

View File

@@ -4078,7 +4078,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
// then pindexFork will be null, and we would need to remove the entire chain including
// our genesis block. In practice this (probably) won't happen because of checks elsewhere.
auto reorgLength = pindexOldTip ? pindexOldTip->GetHeight() - (pindexFork ? pindexFork->GetHeight() : -1) : 0;
static_assert(MAX_REORG_LENGTH > 0, "We must be able to reorg some distance");
assert(MAX_REORG_LENGTH > 0);//, "We must be able to reorg some distance");
if (reorgLength > MAX_REORG_LENGTH)
{
int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid;