diff options
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/interfaces.cpp | 8 | ||||
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 9 |
2 files changed, 9 insertions, 8 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())); } diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index ba2e17d62a..01f2dfe06b 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -213,8 +213,7 @@ BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup) key.pushKV("timestamp", newTip->GetBlockTimeMax() + TIMESTAMP_WINDOW + 1); key.pushKV("internal", UniValue(true)); keys.push_back(key); - std::any context; - JSONRPCRequest request(context); + JSONRPCRequest request; request.params.setArray(); request.params.push_back(keys); @@ -265,8 +264,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) AddWallet(wallet); wallet->SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash()); } - std::any context; - JSONRPCRequest request(context); + JSONRPCRequest request; request.params.setArray(); request.params.push_back(backup_file); @@ -281,8 +279,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) LOCK(wallet->cs_wallet); wallet->SetupLegacyScriptPubKeyMan(); - std::any context; - JSONRPCRequest request(context); + JSONRPCRequest request; request.params.setArray(); request.params.push_back(backup_file); AddWallet(wallet); |