@@ -968,8 +968,8 @@ fn max_htlc_from_capacity(capacity: EffectiveCapacity, max_channel_saturation_po
968
968
EffectiveCapacity :: Unknown => EffectiveCapacity :: Unknown . as_msat ( ) ,
969
969
EffectiveCapacity :: AdvertisedMaxHTLC { amount_msat } =>
970
970
amount_msat. checked_shr ( saturation_shift) . unwrap_or ( 0 ) ,
971
- // Treat max_htlc from a route hint as an exact liquidity amount rather than right shifting,
972
- // since the invoice is expected to have been generated from up-to-date capacity information.
971
+ // Treat htlc_maximum_msat from a route hint as an exact liquidity amount, since the invoice is
972
+ // expected to have been generated from up-to-date capacity information.
973
973
EffectiveCapacity :: HintMaxHTLC { amount_msat } => amount_msat,
974
974
EffectiveCapacity :: Total { capacity_msat, htlc_maximum_msat } =>
975
975
cmp:: min ( capacity_msat. checked_shr ( saturation_shift) . unwrap_or ( 0 ) , htlc_maximum_msat) ,
@@ -5916,8 +5916,8 @@ mod tests {
5916
5916
5917
5917
#[ test]
5918
5918
fn abide_by_route_hint_max_htlc ( ) {
5919
- // Check that we abide by any max_htlc provided in the route hints of the payment params in
5920
- // the final route.
5919
+ // Check that we abide by any htlc_maximum_msat provided in the route hints of the payment
5920
+ // params in the final route.
5921
5921
let ( secp_ctx, network_graph, _, _, logger) = build_graph ( ) ;
5922
5922
let netgraph = network_graph. read_only ( ) ;
5923
5923
let ( _, our_id, _, nodes) = get_nodes ( & secp_ctx) ;
@@ -5944,15 +5944,15 @@ mod tests {
5944
5944
. with_bolt11_features ( channelmanager:: provided_invoice_features ( & config) ) . unwrap ( ) ;
5945
5945
5946
5946
// Make sure we'll error if our route hints don't have enough liquidity according to their
5947
- // max_htlc .
5947
+ // htlc_maximum_msat .
5948
5948
if let Err ( LightningError { err, action : ErrorAction :: IgnoreError } ) = get_route ( & our_id,
5949
5949
& payment_params, & netgraph, None , max_htlc_msat + 1 , Arc :: clone ( & logger) , & scorer, & ( ) ,
5950
5950
& random_seed_bytes)
5951
5951
{
5952
5952
assert_eq ! ( err, "Failed to find a sufficient route to the given destination" ) ;
5953
5953
} else { panic ! ( ) ; }
5954
5954
5955
- // Make sure we'll split an MPP payment across route hints if their max_htlcs warrant it .
5955
+ // Make sure we'll split an MPP payment across route hints if their htlc_maximum_msat warrants .
5956
5956
let mut route_hint_2 = route_hint_1. clone ( ) ;
5957
5957
route_hint_2. 0 [ 0 ] . short_channel_id = 43 ;
5958
5958
let payment_params = PaymentParameters :: from_node_id ( dest_node_id, 42 )
0 commit comments