mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 2364d17a31 into merged_master (Bitcoin PR bitcoin/bitcoin#25480)
This commit is contained in:
commit
438cb545b7
7 changed files with 12 additions and 20 deletions
|
|
@ -3902,15 +3902,15 @@ static bool ContextualCheckBlock(const CBlock& block, BlockValidationState& stat
|
|||
const int nHeight = pindexPrev == nullptr ? 0 : pindexPrev->nHeight + 1;
|
||||
|
||||
// Enforce BIP113 (Median Time Past).
|
||||
int nLockTimeFlags = 0;
|
||||
bool enforce_locktime_median_time_past{false};
|
||||
if (DeploymentActiveAfter(pindexPrev, chainman, Consensus::DEPLOYMENT_CSV)) {
|
||||
assert(pindexPrev != nullptr);
|
||||
nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST;
|
||||
enforce_locktime_median_time_past = true;
|
||||
}
|
||||
|
||||
int64_t nLockTimeCutoff = (nLockTimeFlags & LOCKTIME_MEDIAN_TIME_PAST)
|
||||
? pindexPrev->GetMedianTimePast()
|
||||
: block.GetBlockTime();
|
||||
const int64_t nLockTimeCutoff{enforce_locktime_median_time_past ?
|
||||
pindexPrev->GetMedianTimePast() :
|
||||
block.GetBlockTime()};
|
||||
|
||||
// Check that all transactions are finalized
|
||||
for (const auto& tx : block.vtx) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue