We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95c3fdd commit 5a66f12Copy full SHA for 5a66f12
lightning/src/ln/outbound_payment.rs
@@ -1028,7 +1028,10 @@ impl OutboundPayments {
1028
) -> Result<(), Bolt12PaymentError> where ES::Target: EntropySource {
1029
macro_rules! abandon_with_entry {
1030
($payment: expr, $reason: expr) => {
1031
- debug_assert!(matches!($payment.get(), PendingOutboundPayment::AwaitingInvoice { .. }));
+ assert!(
1032
+ matches!($payment.get(), PendingOutboundPayment::AwaitingInvoice { .. }),
1033
+ "Generating PaymentFailed for unexpected outbound payment type can result in funds loss"
1034
+ );
1035
pending_events.lock().unwrap().push_back((events::Event::PaymentFailed {
1036
payment_id,
1037
payment_hash: None,
0 commit comments