-
Notifications
You must be signed in to change notification settings - Fork 283
Add support for option_onion_messages_only_channels
#3342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -613,7 +613,7 @@ class Peer(val nodeParams: NodeParams, | |
| OnionMessages.process(nodeParams.privateKey, msg) match { | ||
| case OnionMessages.DropMessage(reason) => | ||
| log.info("dropping message from {}: {}", remoteNodeId.value.toHex, reason.toString) | ||
| case OnionMessages.SendMessage(nextNode, message) if nodeParams.features.hasFeature(Features.OnionMessages) => | ||
| case OnionMessages.SendMessage(nextNode, message) if nodeParams.features.hasFeature(Features.OnionMessages) || nodeParams.features.hasFeature(Features.OnionMessagesChannelsOnly) => | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do we check that we indeed have channels with that peer in the `Features.OnionMessagesChannelsOnly case?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is done inside |
||
| val messageId = randomBytes32() | ||
| log.info("relaying onion message with messageId={}", messageId) | ||
| val relay = context.spawn(Behaviors.supervise(MessageRelay(nodeParams, switchboard, register, router)).onFailure(typed.SupervisorStrategy.stop), s"relay-message-$messageId") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is
Features.OnionMessagesChannelsOnlynot checked here ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you do with it? The
RelauPolicyis eitherRelayAllorRelayChannelsOnly, there's no other value available. There is anenabledfield on the entire policy that is used to disable it.