Skip to content

Commit 4dce209

Browse files
authored
Merge pull request #2316 from benthecarman/payment-err-dervies
Derive a PartialEq and Eq for PaymentError
2 parents 64c58a5 + 3003f7d commit 4dce209

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lightning-invoice/src/payment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn expiry_time_from_unix_epoch(invoice: &Invoice) -> Duration {
169169
}
170170

171171
/// An error that may occur when making a payment.
172-
#[derive(Clone, Debug)]
172+
#[derive(Clone, Debug, PartialEq, Eq)]
173173
pub enum PaymentError {
174174
/// An error resulting from the provided [`Invoice`] or payment hash.
175175
Invoice(&'static str),

lightning/src/ln/outbound_payment.rs

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

0 commit comments

Comments
 (0)