diff options
author | dergoegge <n.goeggi@gmail.com> | 2024-01-05 17:16:38 +0000 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2024-01-05 17:16:38 +0000 |
commit | ff9039f6ea876bab2c40a06a93e0dd087f445fa2 (patch) | |
tree | f02d9c74ad4de3eef6069adab3fb8b4946e1fef1 /src/headerssync.cpp | |
parent | 4b1196a9855dcd188a24f393aa2fa21e2d61f061 (diff) | |
download | bitcoin-ff9039f6ea876bab2c40a06a93e0dd087f445fa2.tar.xz |
Remove GetAdjustedTime
Diffstat (limited to 'src/headerssync.cpp')
-rw-r--r-- | src/headerssync.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/headerssync.cpp b/src/headerssync.cpp index 234fc8da60..e1dfe10483 100644 --- a/src/headerssync.cpp +++ b/src/headerssync.cpp @@ -41,7 +41,7 @@ HeadersSyncState::HeadersSyncState(NodeId id, const Consensus::Params& consensus // exceeds this bound, because it's not possible for a consensus-valid // chain to be longer than this (at the current time -- in the future we // could try again, if necessary, to sync a longer chain). - m_max_commitments = 6*(Ticks<std::chrono::seconds>(GetAdjustedTime() - NodeSeconds{std::chrono::seconds{chain_start->GetMedianTimePast()}}) + MAX_FUTURE_BLOCK_TIME) / HEADER_COMMITMENT_PERIOD; + m_max_commitments = 6*(Ticks<std::chrono::seconds>(NodeClock::now() - NodeSeconds{std::chrono::seconds{chain_start->GetMedianTimePast()}}) + MAX_FUTURE_BLOCK_TIME) / HEADER_COMMITMENT_PERIOD; LogPrint(BCLog::NET, "Initial headers sync started with peer=%d: height=%i, max_commitments=%i, min_work=%s\n", m_id, m_current_height, m_max_commitments, m_minimum_required_work.ToString()); } |