X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=76ed56635ac6a57bd22cb82f5bba93e4c210b5c6;hb=6775b957bc0e738afff46eb819c69f45410f1843;hp=4b2eb9674fa8acefa0afba97245ca4674d49e577;hpb=b8ed4d2608e32128dd5a1dee92911638a4301138;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 4b2eb967..76ed5663 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -26,7 +26,7 @@ use bitcoin::secp256k1::PublicKey; use bitcoin::secp256k1::ecdsa::Signature; -use bitcoin::secp256k1; +use bitcoin::{secp256k1, Witness}; use bitcoin::blockdata::script::Script; use bitcoin::hash_types::{Txid, BlockHash}; @@ -42,7 +42,7 @@ use crate::io_extras::read_to_end; use crate::events::{MessageSendEventsProvider, OnionMessageProvider}; use crate::util::logger; -use crate::util::ser::{LengthReadable, Readable, ReadableArgs, Writeable, Writer, WithoutLength, FixedLengthReader, HighZeroBytesDroppedBigSize, Hostname}; +use crate::util::ser::{LengthReadable, Readable, ReadableArgs, Writeable, Writer, WithoutLength, FixedLengthReader, HighZeroBytesDroppedBigSize, Hostname, TransactionU16LenLimited}; use crate::ln::{PaymentPreimage, PaymentHash, PaymentSecret}; @@ -158,6 +158,8 @@ pub struct Pong { /// An [`open_channel`] message to be sent to or received from a peer. /// +/// Used in V1 channel establishment +/// /// [`open_channel`]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message #[derive(Clone, Debug, PartialEq, Eq)] pub struct OpenChannel { @@ -199,8 +201,8 @@ pub struct OpenChannel { pub first_per_commitment_point: PublicKey, /// The channel flags to be used 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