]> git.bitcoin.ninja Git - rust-lightning/commit
Move BOLT12 invoice features check
authorJeffrey Czyz <jkczyz@gmail.com>
Mon, 29 Jul 2024 21:10:43 +0000 (16:10 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Wed, 14 Aug 2024 15:42:18 +0000 (10:42 -0500)
commite4ca166e6298eb57d82d635854ca7cdee0d13279
treec4909b8b9fb83809837c925787f2fcd30ee22f75
parentcfd098048ecddf494c803b925643647ec3ce388a
Move BOLT12 invoice features check

When handling a BOLT12 invoice, and invoice error is sent if the invoice
contains unknown required features. However, since the payment is still
in state AwaitingInvoice, abandoning it results in losing the reason
since an InvoiceRequestFailed event would be generated. Move the check
to PendingOutboundPayments such that the payment is first moved to state
InvoiceReceived so that a PaymentFailed event is generated instead.
lightning/src/ln/channelmanager.rs
lightning/src/ln/outbound_payment.rs