let invoice_om = nodes[1].onion_messenger.next_onion_message_for_peer(nodes[0].node.get_our_node_id()).unwrap();
nodes[0].onion_messenger.handle_onion_message(&nodes[1].node.get_our_node_id(), &invoice_om);
// TODO: assert on the invoice error once we support replying to invoice OMs with failure info
- nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Failed paying invoice: OnionPacketSizeExceeded", 1);
+ nodes[0].logger.assert_log_contains("lightning::ln::channelmanager", "Failed paying invoice: SendingFailed(OnionPacketSizeExceeded)", 1);
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1);
UnexpectedInvoice,
/// Payment for an invoice with the corresponding [`PaymentId`] was already initiated.
DuplicateInvoice,
- /// The [`BlindedPath`]s provided are too large and caused us to exceed the maximum onion hop data
- /// size of 1300 bytes.
- ///
- /// [`BlindedPath`]: crate::blinded_path::BlindedPath
- OnionPacketSizeExceeded,
+ /// The invoice was valid for the corresponding [`PaymentId`], but sending the payment failed.
+ SendingFailed(RetryableSendFailure),
}
/// Indicates that we failed to send a payment probe. Further errors may be surfaced later via
.map_err(|()| {
log_error!(logger, "Can't construct an onion packet without exceeding 1300-byte onion \
hop_data length for payment with id {} and hash {}", payment_id, payment_hash);
- Bolt12PaymentError::OnionPacketSizeExceeded
+ Bolt12PaymentError::SendingFailed(RetryableSendFailure::OnionPacketSizeExceeded)
})?;
if let Some(max_fee_msat) = max_total_routing_fee_msat {