mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-22 21:50: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:
@@ -789,6 +789,12 @@ UniValue estimatefee(const JSONRPCRequest& request)
|
||||
+ HelpExampleCli("estimatefee", "6")
|
||||
);
|
||||
|
||||
if (!IsDeprecatedRPCEnabled("estimatefee")) {
|
||||
throw JSONRPCError(RPC_METHOD_DEPRECATED, "estimatefee is deprecated and will be fully removed in v0.17. "
|
||||
"To use estimatefee in v0.16, restart bitcoind with -deprecatedrpc=estimatefee.\n"
|
||||
"Projects should transition to using estimatesmartfee before upgrading to v0.17");
|
||||
}
|
||||
|
||||
RPCTypeCheck(request.params, {UniValue::VNUM});
|
||||
|
||||
int nBlocks = request.params[0].get_int();
|
||||
|
||||
Reference in New Issue
Block a user