Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Bug fix in getting validators (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmannwong authored Aug 24, 2020
1 parent 2aeca6f commit 41e2260
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beacon/entropy_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ func (entropyGenerator *EntropyGenerator) validators() *types.ValidatorSet {
entropyGenerator.mtx.RLock()
defer entropyGenerator.mtx.RUnlock()

if entropyGenerator.aeon == nil || entropyGenerator.aeon.validators == nil {
return types.NewValidatorSet([]*types.Validator{})
}
return entropyGenerator.aeon.validators
}

Expand Down

0 comments on commit 41e2260

Please sign in to comment.