mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
[fees]: change estimatesmartfee
default mode to economical
This commit is contained in:
parent
b27afb7fb7
commit
41a2545046
@ -36,7 +36,7 @@ static RPCHelpMan estimatesmartfee()
|
||||
"in BIP 141 (witness data is discounted).\n",
|
||||
{
|
||||
{"conf_target", RPCArg::Type::NUM, RPCArg::Optional::NO, "Confirmation target in blocks (1 - 1008)"},
|
||||
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"conservative"}, "The fee estimate mode.\n"
|
||||
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"economical"}, "The fee estimate mode.\n"
|
||||
"Whether to return a more conservative estimate which also satisfies\n"
|
||||
"a longer history. A conservative estimate potentially returns a\n"
|
||||
"higher feerate and is more likely to be sufficient for the desired\n"
|
||||
@ -71,13 +71,13 @@ static RPCHelpMan estimatesmartfee()
|
||||
CHECK_NONFATAL(mempool.m_opts.signals)->SyncWithValidationInterfaceQueue();
|
||||
unsigned int max_target = fee_estimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
unsigned int conf_target = ParseConfirmTarget(request.params[0], max_target);
|
||||
bool conservative = true;
|
||||
bool conservative = false;
|
||||
if (!request.params[1].isNull()) {
|
||||
FeeEstimateMode fee_mode;
|
||||
if (!FeeModeFromString(request.params[1].get_str(), fee_mode)) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, InvalidEstimateModeErrorMessage());
|
||||
}
|
||||
if (fee_mode == FeeEstimateMode::ECONOMICAL) conservative = false;
|
||||
if (fee_mode == FeeEstimateMode::CONSERVATIVE) conservative = true;
|
||||
}
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
|
Loading…
Reference in New Issue
Block a user