aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authordergoegge <n.goeggi@gmail.com>2024-01-05 17:16:38 +0000
committerdergoegge <n.goeggi@gmail.com>2024-01-05 17:16:38 +0000
commitff9039f6ea876bab2c40a06a93e0dd087f445fa2 (patch)
treef02d9c74ad4de3eef6069adab3fb8b4946e1fef1 /src/node
parent4b1196a9855dcd188a24f393aa2fa21e2d61f061 (diff)
Remove GetAdjustedTime
Diffstat (limited to 'src/node')
-rw-r--r--src/node/miner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node/miner.cpp b/src/node/miner.cpp
index ce5452d1f9..89498fb976 100644
--- a/src/node/miner.cpp
+++ b/src/node/miner.cpp
@@ -31,7 +31,7 @@ namespace node {
int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev)
{
int64_t nOldTime = pblock->nTime;
- int64_t nNewTime{std::max<int64_t>(pindexPrev->GetMedianTimePast() + 1, TicksSinceEpoch<std::chrono::seconds>(GetAdjustedTime()))};
+ int64_t nNewTime{std::max<int64_t>(pindexPrev->GetMedianTimePast() + 1, TicksSinceEpoch<std::chrono::seconds>(NodeClock::now()))};
if (nOldTime < nNewTime) {
pblock->nTime = nNewTime;
@@ -133,7 +133,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
pblock->nVersion = gArgs.GetIntArg("-blockversion", pblock->nVersion);
}
- pblock->nTime = TicksSinceEpoch<std::chrono::seconds>(GetAdjustedTime());
+ pblock->nTime = TicksSinceEpoch<std::chrono::seconds>(NodeClock::now());
m_lock_time_cutoff = pindexPrev->GetMedianTimePast();
int nPackagesSelected = 0;
@@ -171,7 +171,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
BlockValidationState state;
if (m_options.test_block_validity && !TestBlockValidity(state, chainparams, m_chainstate, *pblock, pindexPrev,
- GetAdjustedTime, /*fCheckPOW=*/false, /*fCheckMerkleRoot=*/false)) {
+ /*fCheckPOW=*/false, /*fCheckMerkleRoot=*/false)) {
throw std::runtime_error(strprintf("%s: TestBlockValidity failed: %s", __func__, state.ToString()));
}
const auto time_2{SteadyClock::now()};