lnwire: define NodeAnnouncement2

In this commit, the lnwire.NodeAnnouncement2 type is defined. This will
be used to represent the `node_announcement_2` message used in the
Gossip 2 (1.75) protocol.
This commit is contained in:
Elle Mouton committed 2025-10-02 12:15:16 +02:00
1 parent e24dd2f9e0
commit b8ff9fbef3
6 files changed
+873

No files matched your search

+5
View File
@@ -64,6 +64,7 @@ const (
MsgReplyChannelRange = 264
MsgGossipTimestampRange = 265
MsgChannelAnnouncement2 = 267
MsgNodeAnnouncement2 = 269
MsgChannelUpdate2 = 271
MsgKickoffSig = 777
@@ -193,6 +194,8 @@ func (t MessageType) String() string {
return "MsgAnnounceSignatures2"
case MsgChannelAnnouncement2:
return "ChannelAnnouncement2"
case MsgNodeAnnouncement2:
return "NodeAnnouncement2"
case MsgChannelUpdate2:
return "ChannelUpdate2"
default:
@@ -355,6 +358,8 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
msg = &AnnounceSignatures2{}
case MsgChannelAnnouncement2:
msg = &ChannelAnnouncement2{}
case MsgNodeAnnouncement2:
msg = &NodeAnnouncement2{}
case MsgChannelUpdate2:
msg = &ChannelUpdate2{}
default: