aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-04-02 13:35:01 -0400
committerRussell Yanofsky <russ@yanofsky.org>2021-04-07 04:53:26 -0400
commit9044522ef76f880760165d98fab024802ccfc062 (patch)
tree63f8b5c4d33440fda5e50c34ca22c6f80f81e269 /src/init.cpp
parentaa69471ecd553dbcd7dd6d1b2e59dfb69d6a0cf3 (diff)
downloadbitcoin-9044522ef76f880760165d98fab024802ccfc062.tar.xz
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 17b216573f..701a7529af 100644
--- a/src/init.cpp
+++ b/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."));
}