use crate::chain::channelmonitor;
use crate::chain::channelmonitor::MonitorEvent;
use crate::chain::transaction::OutPoint;
use crate::chain::channelmonitor;
use crate::chain::channelmonitor::MonitorEvent;
use crate::chain::transaction::OutPoint;
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);
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 network_graph = self.network_graph.read_only();
if let Some(channel) = network_graph.channel(hop.short_channel_id) {
let (directed, _) = channel.as_directed_to(&NodeId::from_pubkey(&hop.pubkey)).unwrap();
let network_graph = self.network_graph.read_only();
if let Some(channel) = network_graph.channel(hop.short_channel_id) {
let (directed, _) = channel.as_directed_to(&NodeId::from_pubkey(&hop.pubkey)).unwrap();
scorer.channel_penalty_msat(&candidate, usage, &());
} else {
let target_node_id = NodeId::from_pubkey(&hop.pubkey);
scorer.channel_penalty_msat(&candidate, usage, &());
} else {
let target_node_id = NodeId::from_pubkey(&hop.pubkey);
scorer.channel_penalty_msat(&candidate, usage, &());
}
prev_hop_node = &hop.pubkey;
scorer.channel_penalty_msat(&candidate, usage, &());
}
prev_hop_node = &hop.pubkey;