Refactor CFeeRate to use FeeFrac internally

Co-authored-by: Abubakar Sadiq Ismail <48946461+ismaelsadeeq@users.noreply.github.com>
This commit is contained in:
Pol Espinasa
2025-05-17 17:58:42 +02:00
parent c5849663ba
commit d3b8a54a81
11 changed files with 66 additions and 65 deletions

View File

@@ -223,7 +223,7 @@ FUZZ_TARGET(feefrac_mul_div)
if (mul64 < std::numeric_limits<int64_t>::max() / 1000 &&
mul64 > std::numeric_limits<int64_t>::min() / 1000 &&
quot_abs < arith_uint256{std::numeric_limits<int64_t>::max() / 1000}) {
CFeeRate feerate(mul64, (uint32_t)div);
CFeeRate feerate(mul64, div);
CAmount feerate_fee{feerate.GetFee(mul32)};
auto allowed_gap = static_cast<int64_t>(mul32 / 1000 + 3 + round_down);
assert(feerate_fee - res_fee >= -allowed_gap);