aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-30 20:25:22 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-01 09:32:03 +0100
commitfa46ac4d9d6dc99572c44c42adc9bc3f41d701d4 (patch)
treeb2408d305a7ef5ce0ef734dfdf4531d19ee579d2
parentfa6b7adf965e68ec6a46d867966b1d44af98e908 (diff)
miner: Remove uncompiled MTP code
-rw-r--r--src/node/miner.cpp8
-rw-r--r--src/node/miner.h3
2 files changed, 4 insertions, 7 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp
index 046cc618ce..291a6e1d10 100644
--- a/src/node/miner.cpp
+++ b/src/node/miner.cpp
@@ -134,11 +134,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
}
pblock->nTime = GetAdjustedTime();
- const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();
-
- nLockTimeCutoff = (STANDARD_LOCKTIME_VERIFY_FLAGS & 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
@@ -223,7 +219,7 @@ bool BlockAssembler::TestPackage(uint64_t packageSize, int64_t packageSigOpsCost
bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& package) const
{
for (CTxMemPool::txiter it : package) {
- if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff)) {
+ if (!IsFinalTx(it->GetTx(), nHeight, m_lock_time_cutoff)) {
return false;
}
if (!fIncludeWitness && it->GetTx().HasWitness()) {
diff --git a/src/node/miner.h b/src/node/miner.h
index be5e2bbe91..e50db731b7 100644
--- a/src/node/miner.h
+++ b/src/node/miner.h
@@ -144,7 +144,8 @@ private:
// Chain context for the block
int nHeight;
- int64_t nLockTimeCutoff;
+ int64_t m_lock_time_cutoff;
+
const CChainParams& chainparams;
const CTxMemPool& m_mempool;
CChainState& m_chainstate;