Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lnwallet/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -5553,6 +5553,11 @@ func genHtlcSigValidationJobs(chanState *channeldb.OpenChannel,
// disk later.
sigType := htlcCustomSigType.TypeVal()
auxSig.WhenSome(func(sigB tlv.Blob) {
Copy link
Collaborator Author

@GeorgeTsagk GeorgeTsagk Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This panic behavior was exposed on this litd itest

Not sure if I should do the nil check, as is now, or if I should instead correctly initialize the map.

This current diff seems to be satisfying for the itest linked above

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should initialize the map correctly instead. Interestingly I ran into the same thing in part 3 of the rebased series today. I did the initialization on nil there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how it looks in master now:

			if htlc.CustomRecords == nil {
				htlc.CustomRecords = make(lnwire.CustomRecords)
			}

See 83fdbda

if htlc.CustomRecords == nil {
htlc.CustomRecords =
make(lnwire.CustomRecords)
}

htlc.CustomRecords[uint64(sigType)] = sigB
})

Expand Down
Loading