We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc209de commit bc49f2bCopy full SHA for bc49f2b
src/client.rs
@@ -164,7 +164,7 @@ impl Requester {
164
.map(|tx| tx.output.iter().map(|txout| txout.value).sum())
165
.unwrap_or(Amount::ZERO);
166
let block_fees = revenue.checked_sub(subsidy).unwrap_or(Amount::ZERO);
167
- let fee_rate = block_fees.to_sat() / weight.to_kwu_floor();
+ let fee_rate = block_fees.to_sat().checked_div(weight.to_kwu_floor()).unwrap_or(0);
168
Ok(FeeRate::from_sat_per_kwu(fee_rate))
169
}
170
0 commit comments