]> git.bitcoin.ninja Git - rust-lightning/commit
Avoid storing a full FinalOnionHopData in OnionPayload::Invoice
authorMatt Corallo <git@bluematt.me>
Thu, 28 Apr 2022 17:10:04 +0000 (10:10 -0700)
committerSean Andersen <seana@squareup.com>
Mon, 2 May 2022 18:41:02 +0000 (11:41 -0700)
commitfc77c57c3c6e165d26cb5c1f5d1afee0ecd02589
treef532f30ce86b0b1fd8115e7658ffe4de69325b04
parent62f8df5bcb91f378a135aa564d0b7653ead34fd5
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