Skip to content

Commit

Permalink
f - Merge FailedAlongPath into RetriesExhausted
Browse files Browse the repository at this point in the history
  • Loading branch information
alecchendev committed Apr 4, 2023
1 parent 435ca27 commit a58bfa6
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lightning/src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,14 @@ impl_writeable_tlv_based_enum!(InterceptNextHop,
pub enum PaymentFailureReason {
/// The intended recipient rejected our payment.
RecipientRejected,
/// The payment failed while being forwarded along the path. A [`Event::PaymentPathFailed`]
/// should have come before this.
FailedAlongPath,
/// The user chose to abandon this payment by calling [`ChannelManager::abandon_payment`].
///
/// [`ChannelManager::abandon_payment`]: crate::ln::channelmanager::ChannelManager::abandon_payment
UserAbandoned,
/// We exhausted all of our retry attempts while trying to send the payment, or we
/// exhausted the `Retry::Timeout` if the user set one.
/// exhausted the `Retry::Timeout` if the user set one. If at any point the reason a retry
/// attempt failed while being forwarded along the path, a [`Event::PaymentPathFailed`] will
/// have come before this.
RetriesExhausted,
/// The payment expired while retrying. If the user chooses to include an `expiry_time` in their
/// `PaymentParams` this payment will be failed if it is retried after this time has elapsed.
Expand All @@ -297,12 +296,11 @@ pub enum PaymentFailureReason {

impl_writeable_tlv_based_enum_upgradable!(PaymentFailureReason,
(0, RecipientRejected) => {},
(2, FailedAlongPath) => {},
(4, UserAbandoned) => {},
(6, RetriesExhausted) => {},
(8, PaymentExpired) => {},
(10, RouteNotFound) => {},
(12, UnexpectedError) => {},
(2, UserAbandoned) => {},
(4, RetriesExhausted) => {},
(6, PaymentExpired) => {},
(8, RouteNotFound) => {},
(10, UnexpectedError) => {},
);

/// An Event which you should probably take some action in response to.
Expand Down

0 comments on commit a58bfa6

Please sign in to comment.