lnwire: add onion message type
This message type is a message that carries an onion-encrypted payload used for BOLT12 messages.
This commit is contained in:
1 parent
c08f918ffc
commit
cb2d8abe40
4 files changed
+114
No files matched your search
@@ -66,6 +66,7 @@ const (
|
||||
MsgChannelAnnouncement2 = 267
|
||||
MsgNodeAnnouncement2 = 269
|
||||
MsgChannelUpdate2 = 271
|
||||
MsgOnionMessage = 513
|
||||
MsgKickoffSig = 777
|
||||
|
||||
// MsgEnd defines the end of the official message range of the protocol.
|
||||
@@ -198,6 +199,8 @@ func (t MessageType) String() string {
|
||||
return "NodeAnnouncement2"
|
||||
case MsgChannelUpdate2:
|
||||
return "ChannelUpdate2"
|
||||
case MsgOnionMessage:
|
||||
return "OnionMessage"
|
||||
default:
|
||||
return "<unknown>"
|
||||
}
|
||||
@@ -362,6 +365,8 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
|
||||
msg = &NodeAnnouncement2{}
|
||||
case MsgChannelUpdate2:
|
||||
msg = &ChannelUpdate2{}
|
||||
case MsgOnionMessage:
|
||||
msg = &OnionMessage{}
|
||||
default:
|
||||
// If the message is not within our custom range and has not
|
||||
// specifically been overridden, return an unknown message.
|
||||
|
||||
Reference in new issue
Block a user