refactor: [rpc] Remove confusing and brittle integral casts

This commit is contained in:
MarcoFalke
2025-12-19 11:59:14 +01:00
parent 516ae5ede4
commit fa66e2d07a
9 changed files with 36 additions and 36 deletions

View File

@@ -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));