Fix a VC crash observed in the local_testnet simulation (#3872)

It's not quite clear why this condition was triggered in the local
simulation, but it seems a viable scenario after the Keymanager API
is integrated in the validator client.

The user can temporarily remove all validator keys from a running
client before adding another set of keys.
This commit is contained in:
zah 2022-07-14 21:48:04 +03:00 committed by GitHub
parent a6deacd878
commit 2bd5d03743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ proc pollForAttesterDuties*(vc: ValidatorClientRef,
res.add(index)
res
if validatorIndices.len == 0:
return 0
var duties: seq[RestAttesterDuty]
var currentRoot: Option[Eth2Digest]