diff --git a/graph/db/sql_store.go b/graph/db/sql_store.go index 650770726..2bfcce530 100644 --- a/graph/db/sql_store.go +++ b/graph/db/sql_store.go @@ -2911,10 +2911,12 @@ func (s *SQLStore) DisconnectBlockAtHeight(height uint32) ( "height: %w", err) } + s.cacheMu.Lock() for _, channel := range removedChans { s.rejectCache.remove(channel.ChannelID) s.chanCache.remove(channel.ChannelID) } + s.cacheMu.Unlock() return removedChans, nil }