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.
We leave a TODO that should be addressed after a discussion at the spec
meeting. For now, having the incorrect TLV type is not a problem since
this ChannelUpdate2 type is not used in production.
In preparation for adding a NodeAnnouncement2 struct along with a
NodeAnnouncement interface, this commit renames the existing
NodeAnnouncment struct to NodeAnnouncement1.
It should be an optional record instead of an fn option. In addition,
its tlv type is bumped to be 14 as this record is also included in the
`DynCommit`. If we use tlv type 0, it will create a conflict in the msg
`DynCommit`, which is fixed in the following commit.
Previously we encode all the fields plus extra data to the field
`ExtraData`, this is now fixed by encoding only unknown data to extra
data. For known records, they are already encoded into the message
fields.
In this commit, we add a new `TestMessage` interface for use in property
tests. With this, we'll be able to generate a random instance of a given
message, using the rapid byte stream. This can also eventually be useful
for fuzzing.