Merge 6664211be2 into merged_master (Bitcoin PR #21574)

This commit is contained in:
Andrew Poelstra 2021-06-29 22:00:51 +00:00
commit 770892540f
11 changed files with 32 additions and 43 deletions

View file

@ -841,7 +841,7 @@ static bool InitSanityCheck()
return true;
}
static bool AppInitServers(const std::any& context, NodeContext& node)
static bool AppInitServers(NodeContext& node)
{
const ArgsManager& args = *Assert(node.args);
RPCServer::OnStarted(&OnRPCStarted);
@ -850,9 +850,9 @@ static bool AppInitServers(const std::any& context, NodeContext& node)
return false;
StartRPC();
node.rpc_interruption_point = RpcInterruptionPoint;
if (!StartHTTPRPC(context))
if (!StartHTTPRPC(&node))
return false;
if (args.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST(context);
if (args.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST(&node);
StartHTTPServer();
return true;
}
@ -1327,7 +1327,7 @@ bool AppInitInterfaces(NodeContext& node)
return true;
}
bool AppInitMain(const std::any& context, NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
{
const ArgsManager& args = *Assert(node.args);
const CChainParams& chainparams = Params();
@ -1440,7 +1440,7 @@ bool AppInitMain(const std::any& context, NodeContext& node, interfaces::BlockAn
*/
if (args.GetBoolArg("-server", false)) {
uiInterface.InitMessage_connect(SetRPCWarmupStatus);
if (!AppInitServers(context, node))
if (!AppInitServers(node))
return InitError(_("Unable to start HTTP server. See debug log for details."));
}