From e7fb47b05ac30dd3772a059e79d56e2a4f6969e1 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Tue, 14 Feb 2023 15:36:37 -0800 Subject: [PATCH] Derive Eq on structs behind anchors build flag --- lightning/src/ln/chan_utils.rs | 4 ++-- lightning/src/util/events.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/chan_utils.rs b/lightning/src/ln/chan_utils.rs index 378b4d794..8c636203e 100644 --- a/lightning/src/ln/chan_utils.rs +++ b/lightning/src/ln/chan_utils.rs @@ -811,7 +811,7 @@ pub fn build_anchor_input_witness(funding_key: &PublicKey, funding_sig: &Signatu /// /// Normally, this is converted to the broadcaster/countersignatory-organized DirectedChannelTransactionParameters /// before use, via the as_holder_broadcastable and as_counterparty_broadcastable functions. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct ChannelTransactionParameters { /// Holder public keys pub holder_pubkeys: ChannelPublicKeys, @@ -835,7 +835,7 @@ pub struct ChannelTransactionParameters { } /// Late-bound per-channel counterparty data used to build transactions. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct CounterpartyChannelTransactionParameters { /// Counter-party public keys pub pubkeys: ChannelPublicKeys, diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 8c981fd1c..75f2afbd2 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -256,7 +256,7 @@ impl_writeable_tlv_based_enum_upgradable!(HTLCDestination, #[cfg(anchors)] /// A descriptor used to sign for a commitment transaction's anchor output. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct AnchorDescriptor { /// A unique identifier used along with `channel_value_satoshis` to re-derive the /// [`InMemorySigner`] required to sign `input`. @@ -276,7 +276,7 @@ pub struct AnchorDescriptor { #[cfg(anchors)] /// A descriptor used to sign for a commitment transaction's HTLC output. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct HTLCDescriptor { /// A unique identifier used along with `channel_value_satoshis` to re-derive the /// [`InMemorySigner`] required to sign `input`. @@ -369,7 +369,7 @@ impl HTLCDescriptor { #[cfg(anchors)] /// Represents the different types of transactions, originating from LDK, to be bumped. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum BumpTransactionEvent { /// Indicates that a channel featuring anchor outputs is to be closed by broadcasting the local /// commitment transaction. Since commitment transactions have a static feerate pre-agreed upon, -- 2.39.5