}
/// 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,
}
/// 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,
}
/// 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 {
/// 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 {