X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=0c23d4425f8663ebe6fce310692b2dc11bc89e08;hb=c383f06538ac664fe3312daf765595ba106d5b98;hp=672c6ae6e96e8387cd840ae97f19080a5d4d8016;hpb=0d3adb8fa08474b6d893a373b78e0195d061cfe6;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 672c6ae6..0c23d442 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -973,7 +973,11 @@ pub struct UnsignedChannelAnnouncement { pub bitcoin_key_1: NodeId, /// The funding key for the second node pub bitcoin_key_2: NodeId, - pub(crate) excess_data: Vec, + /// Excess data which was signed as a part of the message which we do not (yet) understand how + /// to decode. + /// + /// This is stored to ensure forward-compatibility as new fields are added to the lightning gossip protocol. + pub excess_data: Vec, } /// A [`channel_announcement`] message to be sent to or received from a peer. /// @@ -3760,7 +3764,7 @@ mod tests { let test_bytes = vec![42u8; 1000]; if let OnionHopDataFormat::NonFinalNode { short_channel_id } = payload.format { _encode_varint_length_prefixed_tlv!(&mut encoded_payload, { - (1, test_bytes, vec_type), + (1, test_bytes, required_vec), (2, HighZeroBytesDroppedBigSize(payload.amt_to_forward), required), (4, HighZeroBytesDroppedBigSize(payload.outgoing_cltv_value), required), (6, short_channel_id, required)