Skip to content

Commit 390f5a1

Browse files
committed
Fix: Ignore SCIDs when creating full-length blinded paths
Previously, the `compact_paths` flag was only used to determine whether to use a compact introduction node when creating compact blinded paths. With the upcoming change to accept `MessageForwardNode` in `create_blinded_paths`, there's a risk of SCIDs being passed (and used) even when the user intends to create a full-length blinded path. This patch updates the logic in `create_blinded_paths_from_iter` to ignore SCIDs unless `compact_paths` is explicitly true—preserving correct behavior for full-length blinded paths.
1 parent 830ffa0 commit 390f5a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ where
569569

570570
let has_one_peer = peers.len() == 1;
571571
let mut peer_info = peers
572+
.map(|peer| MessageForwardNode {
573+
node_id: peer.node_id,
574+
short_channel_id: if compact_paths { peer.short_channel_id } else { None },
575+
})
572576
// Limit to peers with announced channels unless the recipient is unannounced.
573577
.filter_map(|peer| {
574578
network_graph

0 commit comments

Comments
 (0)