vc: avoid npe for unknown validator (#4632)

follow-up for #4590
This commit is contained in:
Jacek Sieka 2023-02-16 14:27:10 +01:00 committed by GitHub
parent 73702ad150
commit d63179ab57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -89,7 +89,6 @@ proc pollForValidatorIndices*(vc: ValidatorClientRef) {.async.} =
for item in validators:
var validator = vc.attachedValidators[].getValidator(item.validator.pubkey)
if isNil(validator):
validator.updateValidator(Opt.none ValidatorAndIndex)
missing.add(validatorLog(item.validator.pubkey, item.index))
else:
validator.updateValidator(Opt.some ValidatorAndIndex(