aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r--src/rpc/mining.cpp41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index c22d0ac377..6c36c06017 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -772,43 +772,8 @@ UniValue submitblock(const JSONRPCRequest& request)
UniValue estimatefee(const JSONRPCRequest& request)
{
- if (request.fHelp || request.params.size() != 1)
- throw std::runtime_error(
- "estimatefee nblocks\n"
- "\nDEPRECATED. Please use estimatesmartfee for more intelligent estimates."
- "\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
- "confirmation within nblocks blocks. Uses virtual transaction size of transaction\n"
- "as defined in BIP 141 (witness data is discounted).\n"
- "\nArguments:\n"
- "1. nblocks (numeric, required)\n"
- "\nResult:\n"
- "n (numeric) estimated fee-per-kilobyte\n"
- "\n"
- "A negative value is returned if not enough transactions and blocks\n"
- "have been observed to make an estimate.\n"
- "-1 is always returned for nblocks == 1 as it is impossible to calculate\n"
- "a fee that is high enough to get reliably included in the next block.\n"
- "\nExample:\n"
- + 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();
- if (nBlocks < 1)
- nBlocks = 1;
-
- CFeeRate feeRate = ::feeEstimator.estimateFee(nBlocks);
- if (feeRate == CFeeRate(0))
- return -1.0;
-
- return ValueFromAmount(feeRate.GetFeePerK());
+ throw JSONRPCError(RPC_METHOD_DEPRECATED, "estimatefee was removed in v0.17.\n"
+ "Clients should use estimatesmartfee.");
}
UniValue estimatesmartfee(const JSONRPCRequest& request)
@@ -986,7 +951,7 @@ static const CRPCCommand commands[] =
{ "generating", "generatetoaddress", &generatetoaddress, {"nblocks","address","maxtries"} },
- { "util", "estimatefee", &estimatefee, {"nblocks"} },
+ { "hidden", "estimatefee", &estimatefee, {} },
{ "util", "estimatesmartfee", &estimatesmartfee, {"conf_target", "estimate_mode"} },
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },