X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=39c00105f8d675e5cf5ce664b2d7416654c40cfb;hb=09714e6fe286b8cd5863b616748362b76c2fbdf0;hp=c45e2277fb8db5a307a2b0c13fb546d97d62ec74;hpb=1f592b045fb6b2788c595e573412aa93f3ebc850;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index c45e2277..39c00105 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -30,12 +30,13 @@ use bitcoin::secp256k1; use bitcoin::blockdata::script::Script; use bitcoin::hash_types::{Txid, BlockHash}; -use ln::features::{ChannelFeatures, InitFeatures, NodeFeatures}; +use ln::features::{ChannelFeatures, ChannelTypeFeatures, InitFeatures, NodeFeatures}; use prelude::*; use core::{cmp, fmt}; use core::fmt::Debug; -use std::io::Read; +use io::{self, Read}; +use io_extras::read_to_end; use util::events::MessageSendEventsProvider; use util::logger; @@ -64,7 +65,7 @@ pub enum DecodeError { BadLengthDescriptor, /// Error from std::io Io(/// (C-not exported) as ErrorKind doesn't have a reasonable mapping - ::std::io::ErrorKind), + io::ErrorKind), /// The message included zlib-compressed values, which we don't support. UnsupportedCompression, } @@ -147,6 +148,10 @@ pub struct OpenChannel { pub channel_flags: u8, /// Optionally, a request to pre-set the to-sender output's scriptPubkey for when we collaboratively close pub shutdown_scriptpubkey: OptionalField