use std::{cmp, fmt};
use std::io::Read;
-use std::result::Result;
use util::events;
use util::ser::{Readable, Writeable, Writer, FixedLengthReader, HighZeroBytesDroppedVarInt};
/// 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,
}
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())
}
}