mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
validation: assert that pindexPrev is non-null when required
This commit is contained in:
@@ -3267,6 +3267,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c
|
|||||||
// Start enforcing BIP113 (Median Time Past) using versionbits logic.
|
// Start enforcing BIP113 (Median Time Past) using versionbits logic.
|
||||||
int nLockTimeFlags = 0;
|
int nLockTimeFlags = 0;
|
||||||
if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == ThresholdState::ACTIVE) {
|
if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == ThresholdState::ACTIVE) {
|
||||||
|
assert(pindexPrev != nullptr);
|
||||||
nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST;
|
nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user