@@ -1237,10 +1237,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> Score for Probabilis
1237
1237
let amount_msat = path. final_value_msat ( ) ;
1238
1238
log_trace ! ( self . logger, "Scoring path through to SCID {} as having failed at {} msat" , short_channel_id, amount_msat) ;
1239
1239
let network_graph = self . network_graph . read_only ( ) ;
1240
- for ( hop_idx, ( pubkey, scid) ) in path. hops . iter ( ) . map ( |hop| ( hop. pubkey , hop. short_channel_id ) )
1241
- . chain ( path. blinded_tail . as_ref ( ) . map ( |tail| ( tail. path . introduction_node_id , tail. intro_node_scid ) ) )
1242
- . enumerate ( )
1243
- {
1240
+ for ( hop_idx, ( pubkey, scid) ) in path. node_id_scid_iter ( ) . enumerate ( ) {
1244
1241
let target = NodeId :: from_pubkey ( & pubkey) ;
1245
1242
let channel_directed_from_source = network_graph. channels ( )
1246
1243
. get ( & scid)
@@ -1283,9 +1280,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time> Score for Probabilis
1283
1280
log_trace ! ( self . logger, "Scoring path through SCID {} as having succeeded at {} msat." ,
1284
1281
final_scid, amount_msat) ;
1285
1282
let network_graph = self . network_graph . read_only ( ) ;
1286
- for ( pubkey, scid) in path. hops . iter ( ) . map ( |hop| ( hop. pubkey , hop. short_channel_id ) )
1287
- . chain ( path. blinded_tail . as_ref ( ) . map ( |tail| ( tail. path . introduction_node_id , tail. intro_node_scid ) ) )
1288
- {
1283
+ for ( pubkey, scid) in path. node_id_scid_iter ( ) {
1289
1284
let target = NodeId :: from_pubkey ( & pubkey) ;
1290
1285
let channel_directed_from_source = network_graph. channels ( )
1291
1286
. get ( & scid)
0 commit comments