]> git.bitcoin.ninja Git - rust-lightning/commit
Enable removal of `OnionPayload::Invoice::_legacy_hop_data` later
authorMatt Corallo <git@bluematt.me>
Wed, 4 May 2022 16:29:29 +0000 (16:29 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 19 May 2022 18:16:53 +0000 (18:16 +0000)
commit2a4259566e8d4946e5b8b0bfb58b5eb6a62db611
tree9045c85046a7c86448c2a39aca6808e27ca1e7c6
parent36817e0539378b34f3d07d99e88443107c813200
Enable removal of `OnionPayload::Invoice::_legacy_hop_data` later

In fc77c57c3c6e165d26cb5c1f5d1afee0ecd02589 we stopped using the
`FinalOnionHopData` in `OnionPayload::Invoice` directly and renamed
it `_legacy_hop_data` with the intent of removing it in a few
versions. However, we continue to check that it was included in the
serialized data, meaning we would not be able to remove it without
breaking ability to serialize full `ChannelManager`s.

This fixes that by making the `_legacy_hop_data` an `Option` which
we will happily handle just fine if its `None`.
lightning/src/ln/channelmanager.rs