Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
domiwei committed Apr 23, 2024
1 parent 059d3b4 commit f45d635
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cl/beacon/synced_data/synced_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func (s *SyncedDataManager) HeadState() *state.CachingBeaconState {
}

func (s *SyncedDataManager) HeadStateReader() state.BeaconStateReader {
return s.HeadState()
headstate := s.HeadState()
if headstate == nil {
return nil
}
return headstate
}

func (s *SyncedDataManager) Syncing() bool {
Expand Down

0 comments on commit f45d635

Please sign in to comment.