diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 3b98b4caa..77fdb37c0 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -411,6 +411,10 @@ type processedNetworkMsg struct { // cachedNetworkMsg is a wrapper around a network message that can be used with // *lru.Cache. +// +// NOTE: This struct is not thread safe which means you need to assure no +// concurrent read write access to it and all its contents which are pointers +// as well. type cachedNetworkMsg struct { msgs []*processedNetworkMsg } @@ -3136,7 +3140,9 @@ func (d *AuthenticatedGossiper) handleChanUpdate(ctx context.Context, // NOTE: We don't return anything on the error channel for this // message, as we expect that will be done when this - // ChannelUpdate is later reprocessed. + // ChannelUpdate is later reprocessed. This might never happen + // if the corresponding ChannelAnnouncement is never received + // or the LRU cache is filled up and the entry is evicted. return nil, false default: