Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Preston Van Loon 2020-02-10 14:01:37 -08:00 committed by GitHub
parent 56fcca69d7
commit 5c14cd64c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,7 +400,7 @@ func (p *Status) CurrentEpoch() uint64 {
defer p.lock.RUnlock()
var highestSlot uint64
for _, ps := range p.status {
if ps.chainState.HeadSlot > highestSlot {
if ps != nil && ps.chainState != nil && ps.chainState.HeadSlot > highestSlot {
highestSlot = ps.chainState.HeadSlot
}
}