]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid storing a full FinalOnionHopData in OnionPayload::Invoice
authorMatt Corallo <git@bluematt.me>
Wed, 22 Dec 2021 03:05:39 +0000 (03:05 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 26 Jan 2022 19:09:13 +0000 (19:09 +0000)
commitb0c7616735b3ed2132639c6ee439c2d08fa17e72
tree166ec4b762b7d6339bd27b344dabd837fb9afbb2
parent7c16299042ed514e213037e4d4c90c35280a717d
Avoid storing a full FinalOnionHopData in OnionPayload::Invoice

We only use it to check the amount when processing MPP parts, but
store the full object (including new payment metadata) in it.
Because we now store the amount in the parent structure, there is
no need for it at all in the `OnionPayload`. Sadly, for
serialization compatibility, we need it to continue to exist, at
least temporarily, but we can avoid populating the new fields in
that case.
lightning/src/ln/channelmanager.rs