gui: Fix regression in GUI console

This change prevents "Shutting down" message during "dumptxoutset",
"gettxoutsetinfo" and "scantxoutset" calls.
This commit is contained in:
Hennadii Stepanov
2020-06-18 22:19:26 +03:00
parent abdfd2d0e3
commit 314b49bd50
3 changed files with 17 additions and 8 deletions

View File

@@ -775,13 +775,14 @@ static bool InitSanityCheck()
return true;
}
static bool AppInitServers(const util::Ref& context)
static bool AppInitServers(const util::Ref& context, NodeContext& node)
{
RPCServer::OnStarted(&OnRPCStarted);
RPCServer::OnStopped(&OnRPCStopped);
if (!InitHTTPServer())
return false;
StartRPC();
node.rpc_interruption_point = RpcInterruptionPoint;
if (!StartHTTPRPC(context))
return false;
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE)) StartREST(context);
@@ -1352,7 +1353,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node)
if (gArgs.GetBoolArg("-server", false))
{
uiInterface.InitMessage_connect(SetRPCWarmupStatus);
if (!AppInitServers(context))
if (!AppInitServers(context, node))
return InitError(_("Unable to start HTTP server. See debug log for details."));
}