From: Matt Corallo Date: Thu, 17 Aug 2023 03:35:56 +0000 (+0000) Subject: Update documentation on `Channel::set_outbound_scid_alias` X-Git-Tag: v0.0.117-alpha1~56^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=refs%2Fheads%2F2023-08-err-pre-accept;p=rust-lightning Update documentation on `Channel::set_outbound_scid_alias` ...and replace an assertion with a debug_assertion --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 3d90084db..d5cefc943 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -1000,9 +1000,10 @@ impl ChannelContext { } /// Only allowed immediately after deserialization if get_outbound_scid_alias returns 0, - /// indicating we were written by LDK prior to 0.0.106 which did not set outbound SCID aliases. + /// indicating we were written by LDK prior to 0.0.106 which did not set outbound SCID aliases + /// or prior to any channel actions during `Channel` initialization. pub fn set_outbound_scid_alias(&mut self, outbound_scid_alias: u64) { - assert_eq!(self.outbound_scid_alias, 0); + debug_assert_eq!(self.outbound_scid_alias, 0); self.outbound_scid_alias = outbound_scid_alias; }