ChannelKeys - separate commitment revocation from getting the per-commitment point
[rust-lightning] / lightning / src / ln / msgs.rs
index 303431726979b770e531c73b4f26b8ee15fe20d6..bd5d23504b19961b63224c301853ce26971fd68e 100644 (file)
@@ -25,7 +25,6 @@ use ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
 
 use std::{cmp, fmt};
 use std::io::Read;
-use std::result::Result;
 
 use util::events;
 use util::ser::{Readable, Writeable, Writer, FixedLengthReader, HighZeroBytesDroppedVarInt};
@@ -391,7 +390,7 @@ pub struct UnsignedNodeAnnouncement {
        pub(crate) excess_address_data: Vec<u8>,
        pub(crate) excess_data: Vec<u8>,
 }
-#[derive(PartialEq, Clone)]
+#[derive(PartialEq, Clone, Debug)]
 /// A node_announcement message to be sent or received from a peer
 pub struct NodeAnnouncement {
        pub(crate) signature: Signature,
@@ -462,7 +461,7 @@ pub enum ErrorAction {
 /// An Err type for failure to process messages.
 pub struct LightningError {
        /// A human-readable message describing the error
-       pub err: &'static str,
+       pub err: String,
        /// The action which should be taken against the offending peer.
        pub action: ErrorAction,
 }
@@ -702,7 +701,7 @@ impl fmt::Display for DecodeError {
 
 impl fmt::Debug for LightningError {
        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-               f.write_str(self.err)
+               f.write_str(self.err.as_str())
        }
 }