aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-04-02 12:48:20 -0400
committerRussell Yanofsky <russ@yanofsky.org>2021-04-02 12:48:20 -0400
commit937fd4a66f048780bffc5e714d0c800de987ce93 (patch)
treed793651a83b1b1b14efca0e2574905381c6286ec
parente08f3193b543017702d000c2263bccbefa981c14 (diff)
downloadbitcoin-937fd4a66f048780bffc5e714d0c800de987ce93.tar.xz
Fix wrong wallet RPC context set after #21366
This bug doesn't have any effects currently because it only affects external signer RPCs which aren't currently using the wallet context, but it does cause an appveyor failure in a upcoming PR: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/38512882 This bug is subtle and could have been avoided if JSONRPCRequest didn't have constructors that were so loose with type checking. Suggested change https://github.com/bitcoin/bitcoin/pull/21366#issuecomment-792044351 eliminates these and would be a good followup for a future PR.
-rw-r--r--src/wallet/interfaces.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp
index da5b84ce83..0a284dd43e 100644
--- a/src/wallet/interfaces.cpp
+++ b/src/wallet/interfaces.cpp
@@ -522,7 +522,7 @@ 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);
+ return command.actor({request, &m_context}, result, last_handler);
}, command.argNames, command.unique_id);
m_rpc_handlers.emplace_back(m_context.chain->handleRpc(m_rpc_commands.back()));
}