]> git.bitcoin.ninja Git - rust-lightning/commit
Append backwards-compat TLVs to serialization of larger structs
authorMatt Corallo <git@bluematt.me>
Wed, 5 May 2021 22:56:42 +0000 (22:56 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 24 May 2021 22:05:41 +0000 (22:05 +0000)
commit5a6eea0644362cbf4396815bfe5767f33a134916
tree1ee940381c3b53e07865818de23af217ab4b329f
parentc7e198e6fca8fc31e004b51368978b109c1caff6
Append backwards-compat TLVs to serialization of larger structs

Currently our serialization is very compact, and contains version
numbers to indicate which versions the code can read a given
serialized struct. However, if you want to add a new field without
needlessly breaking the ability of previous versions of the code to
read the struct, there is not a good way to do so.

This adds dummy, currently empty, TLVs to the major structs we
serialize out for users, providing an easy place to put new
optional fields without breaking previous versions.
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/onchaintx.rs
lightning/src/util/ser_macros.rs