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