mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: [rpc] Remove confusing and brittle integral casts
This commit is contained in:
@@ -195,14 +195,14 @@ static RPCHelpMan estimaterawfee()
|
||||
if (feeRate != CFeeRate(0)) {
|
||||
horizon_result.pushKV("feerate", ValueFromAmount(feeRate.GetFeePerK()));
|
||||
horizon_result.pushKV("decay", buckets.decay);
|
||||
horizon_result.pushKV("scale", (int)buckets.scale);
|
||||
horizon_result.pushKV("scale", buckets.scale);
|
||||
horizon_result.pushKV("pass", std::move(passbucket));
|
||||
// buckets.fail.start == -1 indicates that all buckets passed, there is no fail bucket to output
|
||||
if (buckets.fail.start != -1) horizon_result.pushKV("fail", std::move(failbucket));
|
||||
} else {
|
||||
// Output only information that is still meaningful in the event of error
|
||||
horizon_result.pushKV("decay", buckets.decay);
|
||||
horizon_result.pushKV("scale", (int)buckets.scale);
|
||||
horizon_result.pushKV("scale", buckets.scale);
|
||||
horizon_result.pushKV("fail", std::move(failbucket));
|
||||
errors.push_back("Insufficient data or no feerate found which meets threshold");
|
||||
horizon_result.pushKV("errors", std::move(errors));
|
||||
|
||||
Reference in New Issue
Block a user