Skip to content

Commit

Permalink
miner: Always enforce MTP
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Apr 27, 2024
1 parent af952e6 commit 9a6935a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/node/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
}

pblock->nTime = GetAdjustedTimeSeconds();

const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();

bool enforce_locktime_median_time_past{false};
if (chainparams.GetConsensus().IsProtocolV3_1(pblock->nTime)) {
enforce_locktime_median_time_past = true;
}

m_lock_time_cutoff = enforce_locktime_median_time_past ?
nMedianTimePast :
pblock->GetBlockTime();
m_lock_time_cutoff = pindexPrev->GetMedianTimePast();

// Decide whether to include witness transactions
// This is only needed in case the witness softfork activation is reverted
Expand Down

0 comments on commit 9a6935a

Please sign in to comment.