X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fonion_message%2Fpacket.rs;h=4cbb30c0cde5cfa9147736eb685c86e49ffd3539;hb=04463bb44304bdf8f30e8d3b560e4409bf71c21b;hp=2fb2407dbdd093bdbe4ae260e31f12fbe4722d8a;hpb=8f4bd19c04de9b0cb67e0f607d49213a7d71a1f6;p=rust-lightning diff --git a/lightning/src/onion_message/packet.rs b/lightning/src/onion_message/packet.rs index 2fb2407d..4cbb30c0 100644 --- a/lightning/src/onion_message/packet.rs +++ b/lightning/src/onion_message/packet.rs @@ -104,7 +104,7 @@ pub(super) enum Payload { } } -#[derive(Debug)] +#[derive(Clone, Debug)] /// The contents of an onion message. In the context of offers, this would be the invoice, invoice /// request, or invoice error. pub enum OnionMessageContents { @@ -137,7 +137,7 @@ impl Writeable for OnionMessageContents { } /// The contents of a custom onion message. -pub trait CustomOnionMessageContents: Writeable { +pub trait CustomOnionMessageContents: Writeable + Clone { /// Returns the TLV type identifying the message contents. MUST be >= 64. fn tlv_type(&self) -> u64; }