]> git.bitcoin.ninja Git - rust-lightning/commit
Migrate OnchainEvent serialization to be MaybeReadable. 2021-08-chanmon-ser-upgradability
authorMatt Corallo <git@bluematt.me>
Wed, 28 Jul 2021 20:24:20 +0000 (20:24 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 16 Aug 2021 17:35:35 +0000 (17:35 +0000)
commitee43975bf8590afa760524dbbec77c9a7bc0ecd2
treec49ec16d36c15c6d6f75f15f77ad641d67b897e4
parent45490d537edb422c945e8bf20fec21b1878863de
Migrate OnchainEvent serialization to be MaybeReadable.

This adds a new TLV-based enum serialization macro entitled
`impl_writeable_tlv_based_enum_upgradable`. As the name implies,
the new macro allows us to ignore odd-numbered variant entries.
Because the new macro implements only `MaybeReadable` and not
`Readable`, it is not applicable in many contexts, here only being
added for the two `OnchainEvent` structs.
lightning/src/chain/channelmonitor.rs
lightning/src/chain/onchaintx.rs
lightning/src/util/ser_macros.rs