diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-05 08:29:10 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-05 08:29:18 -0400 |
commit | 0fc6ea216c00fff470bd876c53418afca63bf7e9 (patch) | |
tree | 53a78727a5734f16abb94ecd3589a1c3bbaea04e /src/rpc | |
parent | aa35ea55021dbb7f35a00fd666903d9fd03b88e7 (diff) | |
parent | 4a7253ab6c3bb323581cea54573529c2f823f035 (diff) | |
download | bitcoin-0fc6ea216c00fff470bd876c53418afca63bf7e9.tar.xz |
Merge #19096: Remove g_rpc_chain global
4a7253ab6c3bb323581cea54573529c2f823f035 Remove g_rpc_chain global (Russell Yanofsky)
e783197bf0f7429f80fea94b44c59857bc8cfef9 refactor: replace RegisterWalletRPCCommands with GetWalletRPCCommands (Russell Yanofsky)
Pull request description:
Replace with RPC request reference to new WalletContext struct similar to the existing NodeContext struct and reference.
This PR is a followup to #18740 removing the g_rpc_node global.
Some later PRs will follow this up and move more wallet globals to the WalletContext struct.
ACKs for top commit:
MarcoFalke:
ACK 4a7253ab6c3bb323581cea54573529c2f823f035 🎋
ariard:
Code Review ACK 4a7253a, feel free to ignore comment it's super nit.
Tree-SHA512: 5bb5561c89f81811ca5232a58bf450e230d4218e62471c03227d142395fd36131672e99cb88329b33b9680a235db01e8b9d1c1e2a18288349e57205528deabab
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/request.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rpc/request.h b/src/rpc/request.h index 02ec5393a7..4761e9e371 100644 --- a/src/rpc/request.h +++ b/src/rpc/request.h @@ -41,6 +41,16 @@ public: const util::Ref& context; JSONRPCRequest(const util::Ref& context) : id(NullUniValue), params(NullUniValue), fHelp(false), context(context) {} + + //! Initializes request information from another request object and the + //! given context. The implementation should be updated if any members are + //! added or removed above. + JSONRPCRequest(const JSONRPCRequest& other, const util::Ref& context) + : id(other.id), strMethod(other.strMethod), params(other.params), fHelp(other.fHelp), URI(other.URI), + authUser(other.authUser), peerAddr(other.peerAddr), context(context) + { + } + void parse(const UniValue& valRequest); }; |