Skip to content

Commit

Permalink
validation: assert that pindexPrev is non-null when required
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewoof committed Nov 29, 2018
1 parent 60b20c8 commit fbaaf78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/validation.cpp
Expand Up @@ -3267,6 +3267,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c
// Start enforcing BIP113 (Median Time Past) using versionbits logic.
int nLockTimeFlags = 0;
if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == ThresholdState::ACTIVE) {
assert(pindexPrev != nullptr);
nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST;
}

Expand Down

0 comments on commit fbaaf78

Please sign in to comment.