diff options
Diffstat (limited to 'src/rpc/server.cpp')
-rw-r--r-- | src/rpc/server.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 428ab3b9b0..a73b697e01 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -382,6 +382,13 @@ void JSONRPCRequest::parse(const UniValue& valRequest) throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array or object"); } +bool IsDeprecatedRPCEnabled(const std::string& method) +{ + const std::vector<std::string> enabled_methods = gArgs.GetArgs("-deprecatedrpc"); + + return find(enabled_methods.begin(), enabled_methods.end(), method) != enabled_methods.end(); +} + static UniValue JSONRPCExecOne(const UniValue& req) { UniValue rpc_result(UniValue::VOBJ); |