From 355547334f7d08640ee1fa291227356d61145d1a Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 12 Aug 2022 17:29:52 -0400 Subject: Track headers presync progress and log it --- src/headerssync.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/headerssync.h') diff --git a/src/headerssync.h b/src/headerssync.h index 01d55eb44e..16da964246 100644 --- a/src/headerssync.h +++ b/src/headerssync.h @@ -121,6 +121,12 @@ public: /** Return the height reached during the PRESYNC phase */ int64_t GetPresyncHeight() const { return m_current_height; } + /** Return the block timestamp of the last header received during the PRESYNC phase. */ + uint32_t GetPresyncTime() const { return m_last_header_received.nTime; } + + /** Return the amount of work in the chain received during the PRESYNC phase. */ + arith_uint256 GetPresyncWork() const { return m_current_chain_work; } + /** Construct a HeadersSyncState object representing a headers sync via this * download-twice mechanism). * -- cgit v1.2.3