Skip to content

Commit

Permalink
[refactor]: rename estimatefeewithforecasters to estimatefee
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelsadeeq committed May 13, 2024
1 parent f9a9381 commit db5161d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rpc/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "estimatesmartfee", 0, "conf_target" },
{ "estimaterawfee", 0, "conf_target" },
{ "estimaterawfee", 1, "threshold" },
{ "estimatefeewithforecasters", 0, "conf_target" },
{ "estimatefee", 0, "conf_target" },
{ "prioritisetransaction", 1, "dummy" },
{ "prioritisetransaction", 2, "fee_delta" },
{ "setban", 2, "bantime" },
Expand Down
10 changes: 5 additions & 5 deletions src/rpc/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ static RPCHelpMan estimatesmartfee()
};
}

static RPCHelpMan estimatefeewithforecasters()
static RPCHelpMan estimatefee()
{
return RPCHelpMan{
"estimatefeewithforecasters",
"estimatefee",
"\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
"confirmation within conf_target blocks if possible Uses virtual transaction size as defined\n"
"in BIP 141 (witness data is discounted).\n",
Expand All @@ -118,7 +118,7 @@ static RPCHelpMan estimatefeewithforecasters()
{RPCResult::Type::STR, "", "error"},
}},
}},
RPCExamples{HelpExampleCli("estimatefeewithforecasters", "2") + HelpExampleRpc("estimatefeewithforecasters", "2")},
RPCExamples{HelpExampleCli("estimatefee", "2") + HelpExampleRpc("estimatefee", "2")},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
FeeEstimator& fee_estimator = EnsureAnyFeeForecasters(request.context);
const unsigned int targetBlocks = request.params[0].getInt<unsigned int>();
Expand All @@ -129,7 +129,7 @@ static RPCHelpMan estimatefeewithforecasters()
// If the confirmation target is more than 2 fail early.
// This should change whenever we have a forecaster that can support higher target.
if (targetBlocks > 2) {
errors.push_back("estimatefeewithforecasters currently provide estimates for confirmation target 1 and 2 only");
errors.push_back("estimatefee currently provide estimates for confirmation target 1 and 2 only");
result.pushKV("errors", errors);
return result;
}
Expand Down Expand Up @@ -276,7 +276,7 @@ void RegisterFeeRPCCommands(CRPCTable& t)
{
static const CRPCCommand commands[]{
{"util", &estimatesmartfee},
{"util", &estimatefeewithforecasters},
{"util", &estimatefee},
{"hidden", &estimaterawfee},
};
for (const auto& c : commands) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const std::vector<std::string> RPC_COMMANDS_SAFE_FOR_FUZZING{
"disconnectnode",
"echo",
"echojson",
"estimatefeewithforecasters",
"estimatefee",
"estimaterawfee",
"estimatesmartfee",
"finalizepsbt",
Expand Down

0 comments on commit db5161d

Please sign in to comment.