+ if let Some(first_hops) = first_hops {
+ if let Some(idx) = first_hops.iter().position(|h| h.get_outbound_payment_scid() == Some(hop.short_channel_id)) {
+ let node_id = NodeId::from_pubkey(payer);
+ let candidate = CandidateRouteHop::FirstHop {
+ details: first_hops[idx],
+ payer_node_id: &node_id,
+ payer_node_counter: u32::max_value(),
+ target_node_counter: u32::max_value(),
+ };
+ scorer.channel_penalty_msat(&candidate, usage, &());
+ continue;
+ }