Skip to content

Commit 87eef3f

Browse files
committed
fourth commit
1 parent 5bd7708 commit 87eef3f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lightning/src/routing/router.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,13 +1270,14 @@ where L::Target: Logger {
12701270
// around again with a higher amount.
12711271
if !contributes_sufficient_value || exceeds_max_path_length ||
12721272
exceeds_cltv_delta_limit || payment_failed_on_this_channel {
1273-
if let Some(first_hops) = first_hops { // for only first hop it will log feedback
1274-
for hop in first_hops {
1275-
let _channel_id = hop.channel_id;
1273+
let target = first_hop_targets.get(&NodeId::from_pubkey(&our_node_pubkey)).unwrap();
1274+
for channel_details in target {
1275+
if let Some(short_channel_id_target) = channel_details.short_channel_id {
1276+
if short_channel_id == short_channel_id_target {
1277+
log_trace!(logger, "first Hop of node id {our_node_id} is excluded due to a failed requirement.");
1278+
}
12761279
}
1277-
log_trace!(logger, "first Hop is excluded because unfulfilling condition");
1278-
}
1279-
// Path isn't useful, ignore it and move on.
1280+
}
12801281
} else if may_overpay_to_meet_path_minimum_msat {
12811282
hit_minimum_limit = true;
12821283
} else if over_path_minimum_msat {

0 commit comments

Comments
 (0)