From 41e2260c4342da40ab798e0d36e99c322d9ab9a0 Mon Sep 17 00:00:00 2001 From: jinmannwong <38482272+jinmannwong@users.noreply.github.com> Date: Mon, 24 Aug 2020 09:49:20 +0100 Subject: [PATCH] Bug fix in getting validators (#167) --- beacon/entropy_generator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beacon/entropy_generator.go b/beacon/entropy_generator.go index 66b4e4577..4f2a2c163 100644 --- a/beacon/entropy_generator.go +++ b/beacon/entropy_generator.go @@ -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 }