From ef5a38715d941e2d2576e6b2c8aefde28b315410 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 17 Aug 2023 03:35:56 +0000 Subject: [PATCH] Update documentation on `Channel::set_outbound_scid_alias` ...and replace an assertion with a debug_assertion --- lightning/src/ln/channel.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.5