mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Drop JSONRPCRequest constructors after #21366
This just makes an additional simplification after #21366 replaced util::Ref with std::any. It was originally suggested https://github.com/bitcoin/bitcoin/pull/21366#issuecomment-792044351 but delayed for a followup. It would have prevented usage bug https://github.com/bitcoin/bitcoin/pull/21572.
This commit is contained in:
10
src/init.cpp
10
src/init.cpp
@@ -788,7 +788,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);
|
||||
@@ -797,9 +797,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;
|
||||
}
|
||||
@@ -1277,7 +1277,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();
|
||||
@@ -1382,7 +1382,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."));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user