aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/request.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/request.h')
-rw-r--r--src/rpc/request.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/rpc/request.h b/src/rpc/request.h
index 27d06f3c92..bb091efea8 100644
--- a/src/rpc/request.h
+++ b/src/rpc/request.h
@@ -6,14 +6,11 @@
#ifndef BITCOIN_RPC_REQUEST_H
#define BITCOIN_RPC_REQUEST_H
+#include <any>
#include <string>
#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);
@@ -38,18 +35,7 @@ public:
std::string URI;
std::string authUser;
std::string peerAddr;
- const util::Ref& context;
-
- explicit JSONRPCRequest(const util::Ref& context) : id(NullUniValue), params(NullUniValue), 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), mode(other.mode), URI(other.URI),
- authUser(other.authUser), peerAddr(other.peerAddr), context(context)
- {
- }
+ std::any context;
void parse(const UniValue& valRequest);
};