mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Remove g_rpc_chain global
Replace with RPC request reference to new WalletContext struct similar to the
existing NodeContext struct and reference.
This PR is a followup to 25ad2c623a
https://github.com/bitcoin/bitcoin/pull/18740 removing the g_rpc_node global.
Some later PRs will follow this up and move more wallet globals to the
WalletContext struct.
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user