mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
refactor: Pass NodeContext to RPC and REST methods through util::Ref
This commit does not change behavior
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
namespace util {
|
||||
class Ref;
|
||||
} // namespace util
|
||||
|
||||
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
|
||||
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id);
|
||||
std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id);
|
||||
@@ -34,8 +38,9 @@ public:
|
||||
std::string URI;
|
||||
std::string authUser;
|
||||
std::string peerAddr;
|
||||
const util::Ref& context;
|
||||
|
||||
JSONRPCRequest() : id(NullUniValue), params(NullUniValue), fHelp(false) {}
|
||||
JSONRPCRequest(const util::Ref& context) : id(NullUniValue), params(NullUniValue), fHelp(false), context(context) {}
|
||||
void parse(const UniValue& valRequest);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user