Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 792 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
"-1 is always returned for nblocks == 1 as it is impossible to " | "-1 is always returned for nblocks == 1 as it is impossible to " | ||||
"calculate\n" | "calculate\n" | ||||
"a fee that is high enough to get reliably included in the next " | "a fee that is high enough to get reliably included in the next " | ||||
"block.\n" | "block.\n" | ||||
"\nExample:\n" + | "\nExample:\n" + | ||||
HelpExampleCli("estimatefee", "6")); | HelpExampleCli("estimatefee", "6")); | ||||
} | } | ||||
if (!IsDeprecatedRPCEnabled(gArgs, "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}); | RPCTypeCheck(request.params, {UniValue::VNUM}); | ||||
int nBlocks = request.params[0].get_int(); | int nBlocks = request.params[0].get_int(); | ||||
if (nBlocks < 1) { | if (nBlocks < 1) { | ||||
nBlocks = 1; | nBlocks = 1; | ||||
} | } | ||||
CFeeRate feeRate = mempool.estimateFee(nBlocks); | CFeeRate feeRate = mempool.estimateFee(nBlocks); | ||||
Show All 27 Lines |