Skip to content

Commit dedb75a

Browse files
committed
discovery: add comments
1 parent 538723e commit dedb75a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

discovery/gossiper.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ type processedNetworkMsg struct {
411411

412412
// cachedNetworkMsg is a wrapper around a network message that can be used with
413413
// *lru.Cache.
414+
//
415+
// NOTE: This struct is not thread safe which means you need to assure no
416+
// concurrent read write access to it and all its contents which are pointers
417+
// as well.
414418
type cachedNetworkMsg struct {
415419
msgs []*processedNetworkMsg
416420
}
@@ -3136,7 +3140,9 @@ func (d *AuthenticatedGossiper) handleChanUpdate(ctx context.Context,
31363140

31373141
// NOTE: We don't return anything on the error channel for this
31383142
// message, as we expect that will be done when this
3139-
// ChannelUpdate is later reprocessed.
3143+
// ChannelUpdate is later reprocessed. This might never happen
3144+
// if the corresponding ChannelAnnouncement is never received
3145+
// or the LRU cache is filled up and the entry is evicted.
31403146
return nil, false
31413147

31423148
default:

0 commit comments

Comments
 (0)