Skip to content

Commit 97c0924

Browse files
committed
Fix cmp::max execution in ChannelContext::get_dust_buffer_feerate
The current `cmp::max` doesnt align with the function comment, ie its comparing 2530 and `feerate_plus_quarter` instead of `feerate_per_kw + 2530` and `feerate_plus_quarter` which is fixed in this commit
1 parent b8b1ef3 commit 97c0924

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
26992699
feerate_per_kw = cmp::max(feerate_per_kw, feerate);
27002700
}
27012701
let feerate_plus_quarter = feerate_per_kw.checked_mul(1250).map(|v| v / 1000);
2702-
cmp::max(2530, feerate_plus_quarter.unwrap_or(u32::max_value()))
2702+
cmp::max(feerate_per_kw + 2530, feerate_plus_quarter.unwrap_or(u32::max_value()))
27032703
}
27042704

27052705
/// Get forwarding information for the counterparty.

0 commit comments

Comments
 (0)