Skip to content

Commit 58c5cb3

Browse files
committed
f update/move comment
1 parent b1cd859 commit 58c5cb3

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

lightning/src/routing/router.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -882,19 +882,14 @@ pub fn get_route<L: Deref>(our_node_id: &PublicKey, network: &NetworkGraph, paye
882882
fees: hop.fees,
883883
};
884884
if add_entry!(hop.short_channel_id, hop.src_node_id, payee, directional_info, None::<u64>, &empty_channel_features, 0, path_value_msat, 0) {
885+
// If this hop connects to a node with which we have a direct channel,
886+
// ignore the network graph and, if the last hop was added, add our
887+
// direct channel to the candidate set.
888+
//
889+
// Note that we *must* check if the last hop was added as `add_entry`
890+
// always assumes that the third argument is a node to which we have a
891+
// path.
885892
if let Some(&(ref first_hop, ref features, ref outbound_capacity_msat, _)) = first_hop_targets.get(&hop.src_node_id) {
886-
// If this hop connects to a node with which we have a direct channel,
887-
// ignore the network graph and, if the last hop was added, add our
888-
// direct channel to the candidate set.
889-
//
890-
// Note that we *must* check if the last hop was added as `add_entry`
891-
// always assumes that the third argument is a node to which we have a
892-
// path.
893-
//
894-
// Currently there are no channel-context features defined, so we are a
895-
// bit lazy here. In the future, we should pull them out via our
896-
// ChannelManager, but there's no reason to waste the space until we
897-
// need them.
898893
add_entry!(first_hop, *our_node_id , hop.src_node_id, dummy_directional_info, Some(outbound_capacity_msat / 1000), features, 0, path_value_msat, 0);
899894
}
900895
}

0 commit comments

Comments
 (0)