diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-08 09:07:57 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-08 09:08:03 +0200 |
commit | 6664211be2b664dd471d7aeea12fcf2859dba860 (patch) | |
tree | b07a5b5c3d8f1398ad62f40cac79b9e7e562f225 /src/wallet/interfaces.cpp | |
parent | 2e9031f95d2bf8d0134103a10a8a2162975f1259 (diff) | |
parent | 9044522ef76f880760165d98fab024802ccfc062 (diff) |
Merge #21574: Drop JSONRPCRequest constructors after #21366
9044522ef76f880760165d98fab024802ccfc062 Drop JSONRPCRequest constructors after #21366 (Russell Yanofsky)
Pull request description:
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.
ACKs for top commit:
promag:
ACK 9044522ef76f880760165d98fab024802ccfc062, fixed conflict in src/wallet/interfaces.cpp.
Tree-SHA512: e909411b8f75013620b94e1a609296befb832fdcb574cd2e6689bfe3c636b03cd4ac1ccb2b32b532daf0f2131bb043464024966310fffc7e3cad77713d4bd0ef
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())); } |