Skip to content

Commit 37ee626

Browse files
committed
fix nil
1 parent e5aae15 commit 37ee626

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

block/internal/syncing/syncer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (s *Syncer) initializeState() error {
357357
// The cache's DaHeight() is initialized from store metadata, so it's always correct even after cache clear.
358358
// Only use cache.DaHeight() when P2P is actively syncing (headerStore has higher height than current state).
359359
daHeight := max(s.genesis.DAStartHeight, min(state.DAHeight-1, 0))
360-
if s.headerStore.Height() > state.LastBlockHeight {
360+
if s.headerStore != nil && s.headerStore.Height() > state.LastBlockHeight {
361361
daHeight = max(daHeight, s.cache.DaHeight())
362362
}
363363
s.daRetrieverHeight.Store(daHeight)

0 commit comments

Comments
 (0)