Use explicit WithoutLength for BOLT 12 features
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 16 Dec 2022 19:35:50 +0000 (13:35 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 6 Jan 2023 04:39:24 +0000 (22:39 -0600)
commitea1a68c6e6098e8d330792204b05c20d705a372c
treec1378c4c60b92f7fcc99b1b2ec9f784502b08767
parent1a437f41502e2f5c768ac30e3976fba7d8c99571
Use explicit WithoutLength for BOLT 12 features

Most BOLT 12 features are used as the value of a TLV record and thus
don't use an explicit length. One exception is the features inside the
blinded payinfo subtype since the TLV record contains a list of them.
However, these features are also used in the BOLT 4 encrypted_data_tlv
TLV stream as a single record, where the length is implicit.

Implement Readable and Writeable for Features wrapped in WithoutLength
such that either serialization can be used where required.
lightning/src/ln/features.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/offer.rs