diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/node.cpp | 4 | ||||
-rw-r--r-- | src/interfaces/node.h | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 969767b90f..21400d00f8 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -80,10 +80,10 @@ public: return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() && AppInitLockDataDirectory(); } - bool appInitMain() override + bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info) override { m_context->chain = MakeChain(*m_context); - return AppInitMain(m_context_ref, *m_context); + return AppInitMain(m_context_ref, *m_context, tip_info); } void appShutdown() override { diff --git a/src/interfaces/node.h b/src/interfaces/node.h index cd3cfe487d..753f3e6b13 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -39,6 +39,16 @@ class Handler; class Wallet; struct BlockTip; +//! Block and header tip information +struct BlockAndHeaderTipInfo +{ + int block_height; + int64_t block_time; + int header_height; + int64_t header_time; + double verification_progress; +}; + //! Top-level interface for a bitcoin node (bitcoind process). class Node { @@ -96,7 +106,7 @@ public: virtual bool baseInitialize() = 0; //! Start node. - virtual bool appInitMain() = 0; + virtual bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info = nullptr) = 0; //! Stop node. virtual void appShutdown() = 0; |