File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 ) ,
You can’t perform that action at this time.
0 commit comments