@@ -1622,9 +1622,13 @@ where L::Target: Logger {
1622
1622
|info| info. features . supports_basic_mpp ( ) ) )
1623
1623
} else { false } ;
1624
1624
1625
- log_trace ! ( logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph" , our_node_pubkey,
1626
- LoggedPayeePubkey ( payment_params. payee. node_id( ) ) , if allow_mpp { "with" } else { "without" } ,
1627
- first_hops. map( |hops| hops. len( ) ) . unwrap_or( 0 ) , if first_hops. is_some( ) { "" } else { "not " } ) ;
1625
+ let max_total_routing_fee_msat = route_params. max_total_routing_fee_msat . unwrap_or ( u64:: max_value ( ) ) ;
1626
+
1627
+ log_trace ! ( logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph with a fee limit of {} msat" ,
1628
+ our_node_pubkey, LoggedPayeePubkey ( payment_params. payee. node_id( ) ) ,
1629
+ if allow_mpp { "with" } else { "without" } ,
1630
+ first_hops. map( |hops| hops. len( ) ) . unwrap_or( 0 ) , if first_hops. is_some( ) { "" } else { "not " } ,
1631
+ max_total_routing_fee_msat) ;
1628
1632
1629
1633
// Step (1).
1630
1634
// Prepare the data we'll use for payee-to-payer search by
@@ -1890,7 +1894,6 @@ where L::Target: Logger {
1890
1894
}
1891
1895
1892
1896
// Ignore hops if augmenting the current path to them would put us over `max_total_routing_fee_msat`
1893
- let max_total_routing_fee_msat = route_params. max_total_routing_fee_msat. unwrap_or( u64 :: max_value( ) ) ;
1894
1897
if total_fee_msat > max_total_routing_fee_msat {
1895
1898
if should_log_candidate {
1896
1899
log_trace!( logger, "Ignoring {} due to exceeding max total routing fee limit." , LoggedCandidateHop ( & $candidate) ) ;
0 commit comments