@@ -1419,12 +1419,6 @@ impl<'a> CandidateRouteHop<'a> {
1419
1419
_ => None ,
1420
1420
}
1421
1421
}
1422
- fn is_one_hop_blinded_path ( & self ) -> bool {
1423
- match self {
1424
- Self :: OneHopBlinded ( _) => true ,
1425
- _ => false ,
1426
- }
1427
- }
1428
1422
/// Returns the source node id of current hop.
1429
1423
///
1430
1424
/// Source node id refers to the node forwarding the HTLC through this hop.
@@ -2163,7 +2157,7 @@ where L::Target: Logger {
2163
2157
let contributes_sufficient_value = available_value_contribution_msat >= minimal_value_contribution_msat;
2164
2158
// Do not consider candidate hops that would exceed the maximum path length.
2165
2159
let path_length_to_node = $next_hops_path_length
2166
- + if $candidate. is_one_hop_blinded_path ( ) { 0 } else { 1 } ;
2160
+ + if $candidate. blinded_hint_idx ( ) . is_some ( ) { 0 } else { 1 } ;
2167
2161
let exceeds_max_path_length = path_length_to_node > max_path_length;
2168
2162
2169
2163
// Do not consider candidates that exceed the maximum total cltv expiry limit.
@@ -2619,8 +2613,7 @@ where L::Target: Logger {
2619
2613
let path_min = candidate. htlc_minimum_msat ( ) . saturating_add (
2620
2614
compute_fees_saturating ( candidate. htlc_minimum_msat ( ) , candidate. fees ( ) ) ) ;
2621
2615
add_entry ! ( & first_hop_candidate, blinded_path_fee, path_contribution_msat, path_min,
2622
- 0_u64 , candidate. cltv_expiry_delta( ) ,
2623
- candidate. blinded_path( ) . map_or( 0 , |path| path. blinded_hops. len( ) . saturating_sub( 1 ) ) as u8 ) ;
2616
+ 0_u64 , candidate. cltv_expiry_delta( ) , 0 ) ;
2624
2617
}
2625
2618
}
2626
2619
}
0 commit comments