aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-05-29 00:07:18 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-08-27 14:33:00 -0400
commitb266b3e0bf29d0f3d5deaeec62d57c5025b35525 (patch)
tree17843e21ddaedc1fbb82b86056b1fcbf8279bcef /src/bitcoind.cpp
parent15886b08aa5f05194633eba063d7412d0e4fd036 (diff)
downloadbitcoin-b266b3e0bf29d0f3d5deaeec62d57c5025b35525.tar.xz
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.
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 227626f40f..02074f820a 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -44,7 +44,6 @@ static void WaitForShutdown(NodeContext& node)
static bool AppInit(int argc, char* argv[])
{
NodeContext node;
- node.chain = interfaces::MakeChain(node);
bool fRet = false;
@@ -144,7 +143,7 @@ static bool AppInit(int argc, char* argv[])
// If locking the data directory failed, exit immediately
return false;
}
- fRet = AppInitMain(context, node);
+ fRet = AppInitInterfaces(node) && AppInitMain(context, node);
}
catch (const std::exception& e) {
PrintExceptionContinue(&e, "AppInit()");