mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Drop JSONRPCRequest constructors after #21366
This just makes an additional simplification after #21366 replaced util::Ref with std::any. It was originally suggested https://github.com/bitcoin/bitcoin/pull/21366#issuecomment-792044351 but delayed for a followup. It would have prevented usage bug https://github.com/bitcoin/bitcoin/pull/21572.
This commit is contained in:
@@ -35,18 +35,7 @@ public:
|
||||
std::string URI;
|
||||
std::string authUser;
|
||||
std::string peerAddr;
|
||||
const std::any& 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 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)
|
||||
{
|
||||
}
|
||||
std::any context;
|
||||
|
||||
void parse(const UniValue& valRequest);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user