aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/request.h10
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);
};