Provide the HTLCs that settled a payment.
authorChris Waterson <waterson@gmail.com>
Sun, 6 Aug 2023 22:39:21 +0000 (15:39 -0700)
committerChris Waterson <waterson@gmail.com>
Mon, 21 Aug 2023 15:30:12 +0000 (11:30 -0400)
commit2e562a2ad88fe214e19e2ee1c5f4db743d9ebe07
tree7d1f2f1256906b31c2e648bfd06b510dba285887
parentd4ad826c6eb85ea91ec7aa2cd4545fa2139a4462
Provide the HTLCs that settled a payment.

Creates a new `events::ClaimedHTLC` struct that contains the relevant
information about a claimed HTLC; e.g., the channel it arrived on, its ID, the
amount of the HTLC, the overall amount of the payment, etc. Adds appropriate
serialization support.

Adds a `Vec<events::ClaimedHTLC>` to the `ClaimingPayment`
structure. Populates this when creating the struct by converting the
`payment.htlcs` (which are `ClaimingHTLC` structs) into `event::ClaimedHTLC`
structs. This is a straightforward transformation.

Adds a `Vec<events::ClaimedHTLC>` to the `events::Event::PaymentClaimed`
enum. This is populated directly from the `ClaimingPayment`'s `htlcs` vec.

Fixes #2477.
lightning/src/events/mod.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs