Skip to content

Commit fa46ac4

Browse files
author
MarcoFalke
committed
miner: Remove uncompiled MTP code
1 parent fa6b7ad commit fa46ac4

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/node/miner.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
134134
}
135135

136136
pblock->nTime = GetAdjustedTime();
137-
const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();
138-
139-
nLockTimeCutoff = (STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST)
140-
? nMedianTimePast
141-
: pblock->GetBlockTime();
137+
m_lock_time_cutoff = pindexPrev->GetMedianTimePast();
142138

143139
// Decide whether to include witness transactions
144140
// This is only needed in case the witness softfork activation is reverted
@@ -223,7 +219,7 @@ bool BlockAssembler::TestPackage(uint64_t packageSize, int64_t packageSigOpsCost
223219
bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package) const
224220
{
225221
for (CTxMemPool::txiter it : package) {
226-
if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff)) {
222+
if (!IsFinalTx(it->GetTx(), nHeight, m_lock_time_cutoff)) {
227223
return false;
228224
}
229225
if (!fIncludeWitness && it->GetTx().HasWitness()) {

src/node/miner.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ class BlockAssembler
144144

145145
// Chain context for the block
146146
int nHeight;
147-
int64_t nLockTimeCutoff;
147+
int64_t m_lock_time_cutoff;
148+
148149
const CChainParams& chainparams;
149150
const CTxMemPool& m_mempool;
150151
CChainState& m_chainstate;

0 commit comments

Comments
 (0)