Convert most P2P msg serialization to a new macro with TLV suffixes 2021-09-ser-cleanup
authorMatt Corallo <git@bluematt.me>
Sun, 29 Aug 2021 06:03:41 +0000 (06:03 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 18 Sep 2021 01:01:41 +0000 (01:01 +0000)
commit997dc5f5f30924c53c5238c256a4d4df22dbae6d
tree0f4b5f5d55945dd5a299031aa7b8c2768f9a7783
parentf60da31e56cab7713119be1658d4204b054a30d2
Convert most P2P msg serialization to a new macro with TLV suffixes

The network serialization format for all messages was changed some
time ago to include a TLV suffix for all messages, however we never
bothered to implement it as there isn't a lot of use validating a
TLV stream with nothing to do with it. However, messages are
increasingly utilizing the TLV suffix feature, and there are some
compatibility concerns with messages written as a part of other
structs having their format changed (see previous commit).

Thus, here we go ahead and convert most message serialization to a
new macro which includes a TLV suffix after a series of fields,
simplifying several serialization implementations in the process.
lightning/src/ln/msgs.rs
lightning/src/util/ser_macros.rs