We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5aae15 commit 37ee626Copy full SHA for 37ee626
1 file changed
block/internal/syncing/syncer.go
@@ -357,7 +357,7 @@ func (s *Syncer) initializeState() error {
357
// The cache's DaHeight() is initialized from store metadata, so it's always correct even after cache clear.
358
// Only use cache.DaHeight() when P2P is actively syncing (headerStore has higher height than current state).
359
daHeight := max(s.genesis.DAStartHeight, min(state.DAHeight-1, 0))
360
- if s.headerStore.Height() > state.LastBlockHeight {
+ if s.headerStore != nil && s.headerStore.Height() > state.LastBlockHeight {
361
daHeight = max(daHeight, s.cache.DaHeight())
362
}
363
s.daRetrieverHeight.Store(daHeight)
0 commit comments