lnwallet: copy over the HTLC extra data in commit diff

This commit is contained in:
Olaoluwa Osuntokun 2024-05-01 00:41:43 -05:00
parent 53117548de
commit 1bac89dda7

View File

@ -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