X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fonion_message%2Fpacket.rs;h=5ce02c54d08800b777a0c2c3a25f27ba1ffae462;hb=ffc24c3af9a274557434a64f74ad72f338c78419;hp=ba90c717b34181783506f0ab5018fc15ec8093de;hpb=d795e247b76f6b0d70a2529c2a05995a909b1134;p=rust-lightning diff --git a/lightning/src/onion_message/packet.rs b/lightning/src/onion_message/packet.rs index ba90c717..5ce02c54 100644 --- a/lightning/src/onion_message/packet.rs +++ b/lightning/src/onion_message/packet.rs @@ -33,7 +33,7 @@ pub(super) const SMALL_PACKET_HOP_DATA_LEN: usize = 1300; pub(super) const BIG_PACKET_HOP_DATA_LEN: usize = 32768; /// Packet of hop data for next peer -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct Packet { /// Bolt 04 version number pub version: u8, @@ -147,7 +147,7 @@ impl Writeable for ParsedOnionMessageContents { } /// The contents of an onion message. -pub trait OnionMessageContents: Writeable { +pub trait OnionMessageContents: Writeable + core::fmt::Debug { /// Returns the TLV type identifying the message contents. MUST be >= 64. fn tlv_type(&self) -> u64; }