Merge pull request #2316 from benthecarman/payment-err-dervies

Derive a PartialEq and Eq for PaymentError
This commit is contained in:
Wilmer Paulino 2023-05-25 09:41:59 -07:00 committed by GitHub
commit 4dce209e97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -169,7 +169,7 @@ fn expiry_time_from_unix_epoch(invoice: &Invoice) -> Duration {
} }
/// An error that may occur when making a payment. /// An error that may occur when making a payment.
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq, Eq)]
pub enum PaymentError { pub enum PaymentError {
/// An error resulting from the provided [`Invoice`] or payment hash. /// An error resulting from the provided [`Invoice`] or payment hash.
Invoice(&'static str), Invoice(&'static str),

View file

@ -312,7 +312,7 @@ impl<T: Time> Display for PaymentAttemptsUsingTime<T> {
/// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment /// [`ChannelManager::send_payment`]: crate::ln::channelmanager::ChannelManager::send_payment
/// [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed /// [`Event::PaymentPathFailed`]: crate::events::Event::PaymentPathFailed
/// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed /// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
#[derive(Clone, Debug)] #[derive(Clone, Debug, PartialEq, Eq)]
pub enum RetryableSendFailure { pub enum RetryableSendFailure {
/// The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired. Note /// The provided [`PaymentParameters::expiry_time`] indicated that the payment has expired. Note
/// that this error is *not* caused by [`Retry::Timeout`]. /// that this error is *not* caused by [`Retry::Timeout`].