From b266b3e0bf29d0f3d5deaeec62d57c5025b35525 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 29 May 2020 00:07:18 -0400 Subject: refactor: Create interfaces earlier during initialization Add AppInitInterfaces function so wallet chain and chain client interfaces are created earlier during initialization. This is needed in the next commit to allow the gui splash screen to be able to register for wallet events through a dedicated WalletClient interface instead managing wallets indirectly through the Node interface. This only works if the wallet client interface is created before the splash screen needs to use it. --- src/interfaces/node.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/interfaces/node.cpp') diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 206262eb0..73171686e 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -64,11 +64,10 @@ public: bool baseInitialize() override { return AppInitBasicSetup(gArgs) && AppInitParameterInteraction(gArgs) && AppInitSanityChecks() && - AppInitLockDataDirectory(); + AppInitLockDataDirectory() && AppInitInterfaces(*m_context); } bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info) override { - m_context->chain = MakeChain(*m_context); return AppInitMain(m_context_ref, *m_context, tip_info); } void appShutdown() override -- cgit v1.2.3