mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 25ad2c623a into merged_master (Bitcoin PR #18740)
This commit is contained in:
commit
51965ad1e6
23 changed files with 264 additions and 133 deletions
11
src/init.cpp
11
src/init.cpp
|
|
@ -833,16 +833,16 @@ static bool InitSanityCheck()
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool AppInitServers()
|
||||
static bool AppInitServers(const util::Ref& context)
|
||||
{
|
||||
RPCServer::OnStarted(&OnRPCStarted);
|
||||
RPCServer::OnStopped(&OnRPCStopped);
|
||||
if (!InitHTTPServer())
|
||||
return false;
|
||||
StartRPC();
|
||||
if (!StartHTTPRPC())
|
||||
if (!StartHTTPRPC(context))
|
||||
return false;
|
||||
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST();
|
||||
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST(context);
|
||||
StartHTTPServer();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1289,7 +1289,7 @@ bool AppInitLockDataDirectory()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AppInitMain(NodeContext& node)
|
||||
bool AppInitMain(const util::Ref& context, NodeContext& node)
|
||||
{
|
||||
const CChainParams& chainparams = Params();
|
||||
// ********************************************************* Step 4a: application initialization
|
||||
|
|
@ -1396,7 +1396,6 @@ bool AppInitMain(NodeContext& node)
|
|||
for (const auto& client : node.chain_clients) {
|
||||
client->registerRpcs();
|
||||
}
|
||||
g_rpc_node = &node;
|
||||
#if ENABLE_ZMQ
|
||||
RegisterZMQRPCCommands(tableRPC);
|
||||
#endif
|
||||
|
|
@ -1412,7 +1411,7 @@ bool AppInitMain(NodeContext& node)
|
|||
if (gArgs.GetBoolArg("-server", false))
|
||||
{
|
||||
uiInterface.InitMessage_connect(SetRPCWarmupStatus);
|
||||
if (!AppInitServers())
|
||||
if (!AppInitServers(context))
|
||||
return InitError(_("Unable to start HTTP server. See debug log for details."));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue