Skip to content

Commit 5387eb6

Browse files
Revert "Make IntroductionNode type private."
This reverts commit fff6f1bc0b315dc697b232a96c005d530c8689a7.
1 parent 4371f06 commit 5387eb6

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

lightning/src/blinded_path/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ impl BlindedMessagePath {
8282
}))
8383
}
8484

85-
/// Attempts to a use a compact representation for the introduction node by using a directed short
86-
/// channel id from a channel in `network_graph` leading to the introduction node.
85+
/// Attempts to a use a compact representation for the [`IntroductionNode`] by using a directed
86+
/// short channel id from a channel in `network_graph` leading to the introduction node.
8787
///
8888
/// While this may result in a smaller encoding, there is a trade off in that the path may
8989
/// become invalid if the channel is closed or hasn't been propagated via gossip. Therefore,

lightning/src/blinded_path/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ pub(super) struct BlindedPath {
5555

5656
/// The unblinded node in a blinded path.
5757
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
58-
pub(crate) enum IntroductionNode {
58+
pub enum IntroductionNode {
5959
/// The node id of the introduction node.
6060
NodeId(PublicKey),
6161
/// The short channel id of the channel leading to the introduction node. The [`Direction`]
6262
/// identifies which side of the channel is the introduction node.
6363
DirectedShortChannelId(Direction, u64),
6464
}
6565

66-
/// The side of a channel that is the introduction node in a blinded path. [BOLT 7] defines which
66+
/// The side of a channel that is the [`IntroductionNode`] in a blinded path. [BOLT 7] defines which
6767
/// nodes is which in the [`ChannelAnnouncement`] message.
6868
///
6969
/// [BOLT 7]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#the-channel_announcement-message

lightning/src/onion_message/messenger.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,9 @@ pub enum Destination {
692692
}
693693

694694
impl Destination {
695-
/// Attempts to resolve the short channel id corresponding to the introduction node of a
696-
/// [`Destination::BlindedPath`] to a node id, if applicable, using the provided
697-
/// [`ReadOnlyNetworkGraph`].
695+
/// Attempts to resolve the [`IntroductionNode::DirectedShortChannelId`] of a
696+
/// [`Destination::BlindedPath`] to a [`IntroductionNode::NodeId`], if applicable, using the
697+
/// provided [`ReadOnlyNetworkGraph`].
698698
pub fn resolve(&mut self, network_graph: &ReadOnlyNetworkGraph) {
699699
if let Destination::BlindedPath(path) = self {
700700
if let IntroductionNode::DirectedShortChannelId(..) = path.introduction_node() {
@@ -862,8 +862,7 @@ where
862862
/// needed to connect to the first node.
863863
///
864864
/// Returns [`SendError::UnresolvedIntroductionNode`] if:
865-
/// - `destination` contains a blinded path where the introduction node is represented by a short
866-
/// channel id,
865+
/// - `destination` contains a blinded path with an [`IntroductionNode::DirectedShortChannelId`],
867866
/// - unless it can be resolved by [`NodeIdLookUp::next_node_id`].
868867
/// Use [`create_onion_message_resolving_destination`] instead to resolve the introduction node
869868
/// first with a [`ReadOnlyNetworkGraph`].

0 commit comments

Comments
 (0)