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:
@@ -514,7 +514,9 @@ public:
|
||||
{
|
||||
for (const CRPCCommand& command : GetWalletRPCCommands()) {
|
||||
m_rpc_commands.emplace_back(command.category, command.name, [this, &command](const JSONRPCRequest& request, UniValue& result, bool last_handler) {
|
||||
return command.actor({request, &m_context}, result, last_handler);
|
||||
JSONRPCRequest wallet_request = request;
|
||||
wallet_request.context = &m_context;
|
||||
return command.actor(wallet_request, result, last_handler);
|
||||
}, command.argNames, command.unique_id);
|
||||
m_rpc_handlers.emplace_back(m_context.chain->handleRpc(m_rpc_commands.back()));
|
||||
}
|
||||
@@ -522,7 +524,9 @@ public:
|
||||
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||
for (const CRPCCommand& command : GetSignerRPCCommands()) {
|
||||
m_rpc_commands.emplace_back(command.category, command.name, [this, &command](const JSONRPCRequest& request, UniValue& result, bool last_handler) {
|
||||
return command.actor({request, &m_context}, result, last_handler);
|
||||
JSONRPCRequest wallet_request = request;
|
||||
wallet_request.context = &m_context;
|
||||
return command.actor(wallet_request, result, last_handler);
|
||||
}, command.argNames, command.unique_id);
|
||||
m_rpc_handlers.emplace_back(m_context.chain->handleRpc(m_rpc_commands.back()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user