Skip to content

Commit fbaaf78

Browse files
committed
validation: assert that pindexPrev is non-null when required
1 parent 60b20c8 commit fbaaf78

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/validation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,6 +3267,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c
32673267
// Start enforcing BIP113 (Median Time Past) using versionbits logic.
32683268
int nLockTimeFlags = 0;
32693269
if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == ThresholdState::ACTIVE) {
3270+
assert(pindexPrev != nullptr);
32703271
nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST;
32713272
}
32723273

0 commit comments

Comments
 (0)