Skip to content

Commit 30248a0

Browse files
committed
f without using "new" rust features
1 parent 7b2db3f commit 30248a0

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).map(|v| v.checked_add(aggregate_next_hops_fee_msat))
1121-
.flatten().unwrap_or(u64::max_value());
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());
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)