mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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:
@@ -9,6 +9,7 @@
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <init.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/handler.h>
|
||||
#include <interfaces/wallet.h>
|
||||
#include <net.h>
|
||||
@@ -50,6 +51,8 @@ namespace {
|
||||
|
||||
class NodeImpl : public Node
|
||||
{
|
||||
public:
|
||||
NodeImpl() { m_interfaces.chain = MakeChain(); }
|
||||
bool parseParameters(int argc, const char* const argv[], std::string& error) override
|
||||
{
|
||||
return gArgs.ParseParameters(argc, argv, error);
|
||||
@@ -68,11 +71,11 @@ class NodeImpl : public Node
|
||||
return AppInitBasicSetup() && AppInitParameterInteraction() && AppInitSanityChecks() &&
|
||||
AppInitLockDataDirectory();
|
||||
}
|
||||
bool appInitMain() override { return AppInitMain(); }
|
||||
bool appInitMain() override { return AppInitMain(m_interfaces); }
|
||||
void appShutdown() override
|
||||
{
|
||||
Interrupt();
|
||||
Shutdown();
|
||||
Shutdown(m_interfaces);
|
||||
}
|
||||
void startShutdown() override { StartShutdown(); }
|
||||
bool shutdownRequested() override { return ShutdownRequested(); }
|
||||
@@ -291,6 +294,7 @@ class NodeImpl : public Node
|
||||
GuessVerificationProgress(Params().TxData(), block));
|
||||
}));
|
||||
}
|
||||
InitInterfaces m_interfaces;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user