X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fmsgs.rs;h=fab396e3c7112af934021041abfcf2e1f4d609af;hb=e4486fe9f4cf682f8cf84f7b4eefe5515cbd3d4e;hp=7295c40d5442dd87639d08bbe6a6a3b2c1d5a873;hpb=5e86bbf97030c69b0118d1bef39554febfb1cbef;p=rust-lightning diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 7295c40d..fab396e3 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -241,6 +241,9 @@ pub struct FundingLocked { pub channel_id: [u8; 32], /// The per-commitment point of the second commitment transaction pub next_per_commitment_point: PublicKey, + /// If set, provides a short_channel_id alias for this channel. The sender will accept payments + /// to be forwarded over this SCID and forward them to this messages' recipient. + pub short_channel_id_alias: Option, } /// A shutdown message to be sent or received from a peer @@ -1155,7 +1158,9 @@ impl_writeable_msg!(FundingSigned, { impl_writeable_msg!(FundingLocked, { channel_id, next_per_commitment_point, -}, {}); +}, { + (1, short_channel_id_alias, option), +}); impl Writeable for Init { fn write(&self, w: &mut W) -> Result<(), io::Error> { @@ -2246,6 +2251,7 @@ mod tests { let funding_locked = msgs::FundingLocked { channel_id: [2; 32], next_per_commitment_point: pubkey_1, + short_channel_id_alias: None, }; let encoded_value = funding_locked.encode(); let target_value = hex::decode("0202020202020202020202020202020202020202020202020202020202020202031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f").unwrap();