ChannelKeys - separate commitment revocation from getting the per-commitment point
[rust-lightning] / lightning / src / ln / msgs.rs
index 6936a7e93c45b96018d6542bdfe99a527f04e882..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};
@@ -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())
        }
 }