mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
nil check (#4822)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
56fcca69d7
commit
5c14cd64c5
@ -400,7 +400,7 @@ func (p *Status) CurrentEpoch() uint64 {
|
|||||||
defer p.lock.RUnlock()
|
defer p.lock.RUnlock()
|
||||||
var highestSlot uint64
|
var highestSlot uint64
|
||||||
for _, ps := range p.status {
|
for _, ps := range p.status {
|
||||||
if ps.chainState.HeadSlot > highestSlot {
|
if ps != nil && ps.chainState != nil && ps.chainState.HeadSlot > highestSlot {
|
||||||
highestSlot = ps.chainState.HeadSlot
|
highestSlot = ps.chainState.HeadSlot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user