don't special-case zero-validator subnet cycling (#2230)

This commit is contained in:
tersec 2021-01-12 17:17:43 +01:00 committed by GitHub
parent dde973e2d4
commit 0fad1b6b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 4 deletions

View File

@ -408,9 +408,6 @@ proc cycleAttestationSubnets(node: BeaconNode, wallSlot: Slot) =
node.chainDag.headState.data.data, validatorIndex.ValidatorIndex) != nil:
attachedValidators.add validatorIndex.ValidatorIndex
if attachedValidators.len == 0:
return
let (newAttestationSubnets, expiringSubnets, newSubnets) =
get_attestation_subnet_changes(
node.chainDag.headState.data.data, attachedValidators,

View File

@ -118,7 +118,6 @@ proc get_attestation_subnet_changes*(
prevAttestationSubnets: AttestationSubnets):
tuple[a: AttestationSubnets, b: set[uint8], c: set[uint8]] =
static: doAssert ATTESTATION_SUBNET_COUNT == 64 # Fits in a set[uint8]
doAssert attachedValidators.len > 0
# Guaranteed equivalent to wallSlot by cycleAttestationSubnets(), especially
# since it'll try to run early in epochs, avoiding race conditions.