aboutsummaryrefslogtreecommitdiff
path: root/src/headerssync.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2022-08-12 17:29:52 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2022-08-29 08:10:35 -0400
commit355547334f7d08640ee1fa291227356d61145d1a (patch)
tree955cb7d78dd72167597499ec9f8ea9627af889dd /src/headerssync.h
parent03712dddfbb9fe0dc7a2ead53c65106189f5c803 (diff)
downloadbitcoin-355547334f7d08640ee1fa291227356d61145d1a.tar.xz
Track headers presync progress and log it
Diffstat (limited to 'src/headerssync.h')
-rw-r--r--src/headerssync.h6
1 files changed, 6 insertions, 0 deletions
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).
*