From 1bac89dda74db40ca7b058b92c20de0401c82f7e Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 1 May 2024 00:41:43 -0500 Subject: [PATCH] lnwallet: copy over the HTLC extra data in commit diff --- lnwallet/channel.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lnwallet/channel.go b/lnwallet/channel.go index b25ee3608..3c6d9f7a9 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -3871,6 +3871,14 @@ func (lc *LightningChannel) createCommitDiff(newCommit *commitment, *pd.OpenCircuitKey) } + // Copy over any custom records as extra data that we + // may not explicitly know about. + pd.CustomRecords.WhenSome(func(b tlv.Blob) { + // TODO(roasbeef): needs to merge w/ existing + // TLVs + copy(htlc.ExtraData[:], b[:]) + }) + logUpdates = append(logUpdates, logUpdate) // Short circuit here since an add should not have any