diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2021-04-02 13:35:01 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2021-04-07 04:53:26 -0400 |
commit | 9044522ef76f880760165d98fab024802ccfc062 (patch) | |
tree | 63f8b5c4d33440fda5e50c34ca22c6f80f81e269 /src/wallet/interfaces.cpp | |
parent | aa69471ecd553dbcd7dd6d1b2e59dfb69d6a0cf3 (diff) | |
download | bitcoin-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/wallet/interfaces.cpp')
-rw-r--r-- | src/wallet/interfaces.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index 0a284dd43e..23bdaa671a 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -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())); } |