diff options
Diffstat (limited to 'src/headerssync.cpp')
-rw-r--r-- | src/headerssync.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/headerssync.cpp b/src/headerssync.cpp index 234fc8da60..e14de004f5 100644 --- a/src/headerssync.cpp +++ b/src/headerssync.cpp @@ -5,8 +5,8 @@ #include <headerssync.h> #include <logging.h> #include <pow.h> -#include <timedata.h> #include <util/check.h> +#include <util/time.h> #include <util/vector.h> // The two constants below are computed using the simulation script in @@ -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()); } |