Skip to content

Commit 19394c2

Browse files
committed
f drop send_onion_message_with_specified_reply_path
1 parent d2cc904 commit 19394c2

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,17 +1145,6 @@ where
11451145
self.offers_handler = offers_handler;
11461146
}
11471147

1148-
/// Sends an [`OnionMessage`] with the given `contents` to `destination`.
1149-
///
1150-
/// See [`OnionMessenger`] for example usage.
1151-
pub fn send_onion_message_with_specified_reply_path<T: OnionMessageContents>(
1152-
&self, contents: T, destination: Destination, reply_path: Option<BlindedMessagePath>
1153-
) -> Result<SendSuccess, SendError> {
1154-
self.find_path_and_enqueue_onion_message(
1155-
contents, destination, reply_path, format_args!("")
1156-
)
1157-
}
1158-
11591148
/// Sends an [`OnionMessage`] based on its [`MessageSendInstructions`].
11601149
pub fn send_onion_message<T: OnionMessageContents>(
11611150
&self, contents: T, instructions: MessageSendInstructions,
@@ -1164,7 +1153,7 @@ where
11641153
}
11651154

11661155
fn send_onion_message_internal<T: OnionMessageContents>(
1167-
&self, message: T, instructions: MessageSendInstructions, log_suffix: fmt::Arguments,
1156+
&self, contents: T, instructions: MessageSendInstructions, log_suffix: fmt::Arguments,
11681157
) -> Result<SendSuccess, SendError> {
11691158
let (destination, reply_path) = match instructions {
11701159
MessageSendInstructions::WithSpecifiedReplyPath { destination, reply_path } =>
@@ -1186,15 +1175,6 @@ where
11861175
(destination, None),
11871176
};
11881177

1189-
self.find_path_and_enqueue_onion_message(
1190-
message, destination, reply_path, log_suffix,
1191-
)
1192-
}
1193-
1194-
fn find_path_and_enqueue_onion_message<T: OnionMessageContents>(
1195-
&self, contents: T, destination: Destination, reply_path: Option<BlindedMessagePath>,
1196-
log_suffix: fmt::Arguments
1197-
) -> Result<SendSuccess, SendError> {
11981178
let mut logger = WithContext::from(&self.logger, None, None, None);
11991179
let result = self.find_path(destination).and_then(|path| {
12001180
let first_hop = path.intermediate_nodes.get(0).map(|p| *p);

0 commit comments

Comments
 (0)