From f5b5a934a23393edec4cfe1209617ad34f6a3b10 Mon Sep 17 00:00:00 2001 From: Erick Cestari Date: Thu, 21 Aug 2025 15:45:26 -0300 Subject: [PATCH] lnwire: make htlc_maximum_msat mandatory in channel_update This commit updates the ChannelUpdate1 message parsing to align with the updated BOLT specification where htlc_maximum_msat is now a mandatory field rather than optional. --- lnwire/channel_update.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lnwire/channel_update.go b/lnwire/channel_update.go index 558d81a9e91..227367ae7ab 100644 --- a/lnwire/channel_update.go +++ b/lnwire/channel_update.go @@ -149,18 +149,12 @@ func (a *ChannelUpdate1) Decode(r io.Reader, _ uint32) error { &a.HtlcMinimumMsat, &a.BaseFee, &a.FeeRate, + &a.HtlcMaximumMsat, ) if err != nil { return err } - // Now check whether the max HTLC field is present and read it if so. - if a.MessageFlags.HasMaxHtlc() { - if err := ReadElements(r, &a.HtlcMaximumMsat); err != nil { - return err - } - } - var tlvRecords ExtraOpaqueData if err := ReadElements(r, &tlvRecords); err != nil { return err