From: Matt Corallo Date: Wed, 1 May 2024 15:18:29 +0000 (+0000) Subject: Add derives where they make sense and the bindings require them X-Git-Tag: v0.0.123-rc1~1^2~2^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=84070e113857fb2842ce4b457375c9bc5ca4f74a;p=rust-lightning Add derives where they make sense and the bindings require them --- diff --git a/lightning/src/blinded_path/mod.rs b/lightning/src/blinded_path/mod.rs index 3b4eac883..3dc6b121b 100644 --- a/lightning/src/blinded_path/mod.rs +++ b/lightning/src/blinded_path/mod.rs @@ -27,7 +27,7 @@ use crate::prelude::*; /// The next hop to forward an onion message along its path. /// /// Note that payment blinded paths always specify their next hop using an explicit node id. -#[derive(Debug)] +#[derive(Clone, Debug, Hash, PartialEq, Eq)] pub enum NextMessageHop { /// The node id of the next hop. NodeId(PublicKey), diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index 8fbcb5877..476655ebe 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -569,7 +569,7 @@ pub trait CustomOnionMessageHandler { /// A processed incoming onion message, containing either a Forward (another onion message) /// or a Receive payload with decrypted contents. -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum PeeledOnion { /// Forwarded onion, with the next node id and a new onion Forward(NextMessageHop, OnionMessage), diff --git a/lightning/src/onion_message/packet.rs b/lightning/src/onion_message/packet.rs index e1054c5db..deda1acb7 100644 --- a/lightning/src/onion_message/packet.rs +++ b/lightning/src/onion_message/packet.rs @@ -117,7 +117,7 @@ pub(super) enum Payload { /// The contents of an [`OnionMessage`] as read from the wire. /// /// [`OnionMessage`]: crate::ln::msgs::OnionMessage -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum ParsedOnionMessageContents { /// A message related to BOLT 12 Offers. Offers(OffersMessage),