mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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:
@@ -33,8 +33,8 @@ UniValue RPCTestingSetup::CallRPC(std::string args)
|
||||
boost::split(vArgs, args, boost::is_any_of(" \t"));
|
||||
std::string strMethod = vArgs[0];
|
||||
vArgs.erase(vArgs.begin());
|
||||
std::any context{&m_node};
|
||||
JSONRPCRequest request(context);
|
||||
JSONRPCRequest request;
|
||||
request.context = &m_node;
|
||||
request.strMethod = strMethod;
|
||||
request.params = RPCConvertValues(strMethod, vArgs);
|
||||
if (RPCIsInWarmup(nullptr)) SetRPCWarmupFinished();
|
||||
|
||||
Reference in New Issue
Block a user