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.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rpc/request.h b/src/rpc/request.h
index 27d06f3c92..e1569673f6 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,14 +35,14 @@ public:
std::string URI;
std::string authUser;
std::string peerAddr;
- const util::Ref& context;
+ const std::any& context;
- explicit JSONRPCRequest(const util::Ref& context) : id(NullUniValue), params(NullUniValue), context(context) {}
+ explicit JSONRPCRequest(const std::any& 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)
+ JSONRPCRequest(const JSONRPCRequest& other, const std::any& context)
: id(other.id), strMethod(other.strMethod), params(other.params), mode(other.mode), URI(other.URI),
authUser(other.authUser), peerAddr(other.peerAddr), context(context)
{