Skip to content

Commit 6f4e0ba

Browse files
committed
f correct missing selection
1 parent 7a1fc14 commit 6f4e0ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lightning/src/routing/router.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,15 +2130,16 @@ where L::Target: Logger {
21302130
IntroductionNode::NodeId(pubkey) => {
21312131
node_counters.node_counter_from_id(&NodeId::from_pubkey(&pubkey))
21322132
},
2133-
IntroductionNode::DirectedShortChannelId(_, scid) => {
2133+
IntroductionNode::DirectedShortChannelId(direction, scid) => {
21342134
let node_id = if let Some(node_id) = path.public_introduction_node_id(network_graph) {
2135-
Some(node_id)
2135+
Some(*node_id)
21362136
} else {
2137-
first_hop_targets.iter().find(|(_, channels)|
2137+
let counterparty_opt = first_hop_targets.iter().find(|(_, channels)|
21382138
channels
21392139
.iter()
21402140
.any(|details| Some(*scid) == details.get_outbound_payment_scid())
2141-
).map(|(counterparty_node_id, _)| counterparty_node_id)
2141+
).map(|(counterparty_node_id, _)| counterparty_node_id);
2142+
counterparty_opt.map(|cp| direction.select_node_id(our_node_id, *cp))
21422143
};
21432144
match node_id {
21442145
Some(node_id) => node_counters.node_counter_from_id(&node_id),

0 commit comments

Comments
 (0)