Skip to content

Commit f45d635

Browse files
committed
fix panic
1 parent 059d3b4 commit f45d635

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cl/beacon/synced_data/synced_data.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ func (s *SyncedDataManager) HeadState() *state.CachingBeaconState {
4444
}
4545

4646
func (s *SyncedDataManager) HeadStateReader() state.BeaconStateReader {
47-
return s.HeadState()
47+
headstate := s.HeadState()
48+
if headstate == nil {
49+
return nil
50+
}
51+
return headstate
4852
}
4953

5054
func (s *SyncedDataManager) Syncing() bool {

0 commit comments

Comments
 (0)