File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1382,6 +1382,15 @@ impl<'a> CandidateRouteHop<'a> {
1382
1382
_ => None ,
1383
1383
}
1384
1384
}
1385
+ fn blinded_hint_idx ( & self ) -> Option < usize > {
1386
+ match self {
1387
+ Self :: Blinded ( BlindedPathCandidate { hint_idx, .. } ) |
1388
+ Self :: OneHopBlinded ( OneHopBlindedPathCandidate { hint_idx, .. } ) => {
1389
+ Some ( * hint_idx)
1390
+ } ,
1391
+ _ => None ,
1392
+ }
1393
+ }
1385
1394
/// Returns the source node id of current hop.
1386
1395
///
1387
1396
/// Source node id refers to the node forwarding the HTLC through this hop.
@@ -2133,8 +2142,15 @@ where L::Target: Logger {
2133
2142
( amount_to_transfer_over_msat < $next_hops_path_htlc_minimum_msat &&
2134
2143
recommended_value_msat >= $next_hops_path_htlc_minimum_msat) ) ;
2135
2144
2136
- let payment_failed_on_this_channel = scid_opt. map_or( false ,
2137
- |scid| payment_params. previously_failed_channels. contains( & scid) ) ;
2145
+ let payment_failed_on_this_channel = match scid_opt {
2146
+ Some ( scid) => payment_params. previously_failed_channels. contains( & scid) ,
2147
+ None if $candidate. blinded_hint_idx( ) . is_some( ) => {
2148
+ payment_params. previously_failed_blinded_path_idxs. contains(
2149
+ & ( $candidate. blinded_hint_idx( ) . unwrap( ) as u64 )
2150
+ )
2151
+ } ,
2152
+ _ => false ,
2153
+ } ;
2138
2154
2139
2155
let ( should_log_candidate, first_hop_details) = match $candidate {
2140
2156
CandidateRouteHop :: FirstHop ( hop) => ( true , Some ( hop. details) ) ,
You can’t perform that action at this time.
0 commit comments