mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
[rpc] Deprecate estimatefee RPC
Deprecate estimatefee in v0.16, for final removal in v0.17. This commit introduces a phased removal of RPC methods. RPC method is disabled by default in version x, but can be enabled by using the `-deprecatedrpc=<method>` argument. RPC method is removed entirely in version (x+1).
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user