mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Pass NodeContext, ConnMan, BanMan references more places
So g_connman and g_banman globals can be removed next commit.
This commit is contained in:
parent
4d5448c76b
commit
e6f4f895d5
34 changed files with 154 additions and 62 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include <compat.h>
|
||||
#include <init.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <node/context.h>
|
||||
#include <noui.h>
|
||||
#include <shutdown.h>
|
||||
#include <ui_interface.h>
|
||||
|
|
@ -24,13 +25,13 @@
|
|||
|
||||
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
|
||||
|
||||
static void WaitForShutdown()
|
||||
static void WaitForShutdown(NodeContext& node)
|
||||
{
|
||||
while (!ShutdownRequested())
|
||||
{
|
||||
MilliSleep(200);
|
||||
}
|
||||
Interrupt();
|
||||
Interrupt(node);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -40,7 +41,7 @@ static void WaitForShutdown()
|
|||
static bool AppInit(int argc, char* argv[])
|
||||
{
|
||||
NodeContext node;
|
||||
node.chain = interfaces::MakeChain();
|
||||
node.chain = interfaces::MakeChain(node);
|
||||
|
||||
bool fRet = false;
|
||||
|
||||
|
|
@ -152,9 +153,9 @@ static bool AppInit(int argc, char* argv[])
|
|||
|
||||
if (!fRet)
|
||||
{
|
||||
Interrupt();
|
||||
Interrupt(node);
|
||||
} else {
|
||||
WaitForShutdown();
|
||||
WaitForShutdown(node);
|
||||
}
|
||||
Shutdown(node);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue