Remove PaymentContext from OnionPayload
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 26 Apr 2024 16:37:24 +0000 (11:37 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 29 Apr 2024 17:27:34 +0000 (12:27 -0500)
commit8e562be5d43dce5a07fc09686d4f7f151f5a2706
treec62aacc94c66e58997da0bdc927be948d809f11c
parentd6900723df7a9cdd75092e89b60674881700c8b2
Remove PaymentContext from OnionPayload

PaymentContext is already stored in ClaimablePayment via PaymentPurpose,
so there is no need to repeat it in each ClaimableHTLC via OnionPayload.
This avoids cloning the PaymentContext each time an HTLC is received,
other than for the first HTLC for a payment.
lightning/src/ln/channelmanager.rs