]> git.bitcoin.ninja Git - rust-lightning/commit
Store an `events::PaymentPurpose` with each claimable payment
authorMatt Corallo <git@bluematt.me>
Wed, 4 May 2022 17:49:09 +0000 (17:49 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 19 May 2022 18:16:53 +0000 (18:16 +0000)
commitbd1e20d49e5b67b55c22ee8927e546327d98e042
treec1ea0cdd98dea3bd3154679bbce30c66306e0e7e
parent2a4259566e8d4946e5b8b0bfb58b5eb6a62db611
Store an `events::PaymentPurpose` with each claimable payment

In fc77c57c3c6e165d26cb5c1f5d1afee0ecd02589 we stopped using the
`FInalOnionHopData` in `OnionPayload::Invoice` directly and intend
to remove it eventually. However, in the next few commits we need
access to the payment secret when claimaing a payment, as we create
a new `PaymentPurpose` during the claim process for a new event.

In order to get access to a `PaymentPurpose` without having access
to the `FinalOnionHopData` we here change the storage of
`claimable_htlcs` to store a single `PaymentPurpose` explicitly
with each set of claimable HTLCs.
lightning/src/ln/channelmanager.rs
lightning/src/util/events.rs