Allowed BIP113 (Median Time Past) since beginning.

This commit is contained in:
Just Wonder 2020-03-07 20:45:05 -08:00
parent eec7114115
commit 01368b925e

View File

@ -3245,7 +3245,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c
}
int64_t nLockTimeCutoff = (nLockTimeFlags & LOCKTIME_MEDIAN_TIME_PAST)
? pindexPrev->GetMedianTimePast()
? (pindexPrev ? pindexPrev->GetMedianTimePast() : block.GetBlockTime())
: block.GetBlockTime();
// Check that all transactions are finalized