Skip to content

Commit 7d5f137

Browse files
authored
Merge pull request #2602 from TheBlueMatt/2023-09-descriptor-hash
Derive `Hash` for `SpendableOutputDescriptor`
2 parents bf91440 + 8a42d55 commit 7d5f137

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/sign/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct KeyMaterial(pub [u8; 32]);
6868
/// Information about a spendable output to a P2WSH script.
6969
///
7070
/// See [`SpendableOutputDescriptor::DelayedPaymentOutput`] for more details on how to spend this.
71-
#[derive(Clone, Debug, PartialEq, Eq)]
71+
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
7272
pub struct DelayedPaymentOutputDescriptor {
7373
/// The outpoint which is spendable.
7474
pub outpoint: OutPoint,
@@ -110,7 +110,7 @@ impl_writeable_tlv_based!(DelayedPaymentOutputDescriptor, {
110110
/// Information about a spendable output to our "payment key".
111111
///
112112
/// See [`SpendableOutputDescriptor::StaticPaymentOutput`] for more details on how to spend this.
113-
#[derive(Clone, Debug, PartialEq, Eq)]
113+
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
114114
pub struct StaticPaymentOutputDescriptor {
115115
/// The outpoint which is spendable.
116116
pub outpoint: OutPoint,
@@ -146,7 +146,7 @@ impl_writeable_tlv_based!(StaticPaymentOutputDescriptor, {
146146
/// at that `txid`/`index`, and any keys or other information required to sign.
147147
///
148148
/// [`SpendableOutputs`]: crate::events::Event::SpendableOutputs
149-
#[derive(Clone, Debug, PartialEq, Eq)]
149+
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
150150
pub enum SpendableOutputDescriptor {
151151
/// An output to a script which was provided via [`SignerProvider`] directly, either from
152152
/// [`get_destination_script`] or [`get_shutdown_scriptpubkey`], thus you should already

0 commit comments

Comments
 (0)