Skip to content

Commit 7586feb

Browse files
committed
f but this time actually compiling
1 parent 30248a0 commit 7586feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/routing/router.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,8 +1117,8 @@ where L::Target: Logger {
11171117
// need it to increment at each hop by the fee charged at later hops. Further,
11181118
// we need to ensure we round up when we divide to get satoshis.
11191119
let channel_cap_msat = final_value_msat
1120-
.checked_mul(ROUTE_CAPACITY_PROVISION_FACTOR).unwrap_or(u64::max_value())
1121-
.map(|v| v.checked_add(aggregate_next_hops_fee_msat)).unwrap_or(u64::max_value());
1120+
.checked_mul(ROUTE_CAPACITY_PROVISION_FACTOR).and_then(|v| v.checked_add(aggregate_next_hops_fee_msat))
1121+
.unwrap_or(u64::max_value());
11221122
let channel_cap_sat = match channel_cap_msat.checked_add(999) {
11231123
None => break, // We overflowed above, just ignore this route hint
11241124
Some(val) => Some(val / 1000),

0 commit comments

Comments
 (0)