mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 10:42:46 +01:00
Pass chain and client variables where needed
This commit does not change behavior. All it does is pass new function
parameters.
It is easiest to review this change with:
git log -p -n1 -U0 --word-diff-regex=.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include <clientversion.h>
|
||||
#include <compat.h>
|
||||
#include <fs.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <rpc/server.h>
|
||||
#include <init.h>
|
||||
#include <noui.h>
|
||||
@@ -58,6 +59,9 @@ static void WaitForShutdown()
|
||||
//
|
||||
static bool AppInit(int argc, char* argv[])
|
||||
{
|
||||
InitInterfaces interfaces;
|
||||
interfaces.chain = interfaces::MakeChain();
|
||||
|
||||
bool fRet = false;
|
||||
|
||||
//
|
||||
@@ -164,7 +168,7 @@ static bool AppInit(int argc, char* argv[])
|
||||
// If locking the data directory failed, exit immediately
|
||||
return false;
|
||||
}
|
||||
fRet = AppInitMain();
|
||||
fRet = AppInitMain(interfaces);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
PrintExceptionContinue(&e, "AppInit()");
|
||||
@@ -178,7 +182,7 @@ static bool AppInit(int argc, char* argv[])
|
||||
} else {
|
||||
WaitForShutdown();
|
||||
}
|
||||
Shutdown();
|
||||
Shutdown(interfaces);
|
||||
|
||||
return fRet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user