X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fmsgs.rs;fp=src%2Fln%2Fmsgs.rs;h=5c5d32f39d51483a1a8c0776d40527565ccfbb78;hb=af89de3d86356285b863bc3c4309b2853c981c96;hp=110e2f336adb7e112fe5104c67a35db8aedf22e7;hpb=d9d8ea3f65500c59e06f7f291c034d35bb08b502;p=rust-lightning diff --git a/src/ln/msgs.rs b/src/ln/msgs.rs index 110e2f33..5c5d32f3 100644 --- a/src/ln/msgs.rs +++ b/src/ln/msgs.rs @@ -151,6 +151,7 @@ pub struct Init { } /// An error message to be sent or received from a peer +#[derive(Clone)] pub struct ErrorMessage { pub(crate) channel_id: [u8; 32], pub(crate) data: String, @@ -235,14 +236,14 @@ pub struct FundingLocked { } /// A shutdown message to be sent or received from a peer -#[derive(Clone)] +#[derive(Clone, PartialEq)] pub struct Shutdown { pub(crate) channel_id: [u8; 32], pub(crate) scriptpubkey: Script, } /// A closing_signed message to be sent or received from a peer -#[derive(Clone)] +#[derive(Clone, PartialEq)] pub struct ClosingSigned { pub(crate) channel_id: [u8; 32], pub(crate) fee_satoshis: u64, @@ -448,6 +449,7 @@ pub struct ChannelUpdate { } /// Used to put an error message in a HandleError +#[derive(Clone)] pub enum ErrorAction { /// The peer took some action which made us think they were useless. Disconnect them. DisconnectPeer { @@ -486,6 +488,7 @@ pub struct CommitmentUpdate { /// The information we received from a peer along the route of a payment we originated. This is /// returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into /// RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. +#[derive(Clone)] pub enum HTLCFailChannelUpdate { /// We received an error which included a full ChannelUpdate message. ChannelUpdateMessage {