]> git.bitcoin.ninja Git - rust-lightning/commit
Drop `vec_type` TLV handling entirely
authorMatt Corallo <git@bluematt.me>
Fri, 7 Jul 2023 21:05:29 +0000 (21:05 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 11 Jul 2023 16:20:03 +0000 (16:20 +0000)
commit907ea200f09deadaaecdda480823457f0a54872e
tree3c386d6c006c82940bf8c8d2acc304c321ce1bc1
parent4b7631ce161c650932f1dfea3539b3f8c9a1eb37
Drop `vec_type` TLV handling entirely

Historically, we used `vec_type` for all TLV Vec reads/writes, but
it is asymmetric and thus somewhat confusing - on the write side it
always writes a TLV entry, even if there are zero elements. On the
read side, it happily accepts a missing TLV, providing a
zero-length vector.

In 85b573ddad70f3c5ee36e0992d587842af507a8d a new `optional_vec`
TLV format was added which was symmetric, but only supports
optional vecs.

Now that we've migrated entirely to the new `required_vec` TLV
type, we can entirely remove the awkward `vec_type`.
lightning/src/util/ser_macros.rs