don't special-case zero-validator subnet cycling (#2230)
This commit is contained in:
parent
dde973e2d4
commit
0fad1b6b26
|
@ -408,9 +408,6 @@ proc cycleAttestationSubnets(node: BeaconNode, wallSlot: Slot) =
|
||||||
node.chainDag.headState.data.data, validatorIndex.ValidatorIndex) != nil:
|
node.chainDag.headState.data.data, validatorIndex.ValidatorIndex) != nil:
|
||||||
attachedValidators.add validatorIndex.ValidatorIndex
|
attachedValidators.add validatorIndex.ValidatorIndex
|
||||||
|
|
||||||
if attachedValidators.len == 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
let (newAttestationSubnets, expiringSubnets, newSubnets) =
|
let (newAttestationSubnets, expiringSubnets, newSubnets) =
|
||||||
get_attestation_subnet_changes(
|
get_attestation_subnet_changes(
|
||||||
node.chainDag.headState.data.data, attachedValidators,
|
node.chainDag.headState.data.data, attachedValidators,
|
||||||
|
|
|
@ -118,7 +118,6 @@ proc get_attestation_subnet_changes*(
|
||||||
prevAttestationSubnets: AttestationSubnets):
|
prevAttestationSubnets: AttestationSubnets):
|
||||||
tuple[a: AttestationSubnets, b: set[uint8], c: set[uint8]] =
|
tuple[a: AttestationSubnets, b: set[uint8], c: set[uint8]] =
|
||||||
static: doAssert ATTESTATION_SUBNET_COUNT == 64 # Fits in a set[uint8]
|
static: doAssert ATTESTATION_SUBNET_COUNT == 64 # Fits in a set[uint8]
|
||||||
doAssert attachedValidators.len > 0
|
|
||||||
|
|
||||||
# Guaranteed equivalent to wallSlot by cycleAttestationSubnets(), especially
|
# Guaranteed equivalent to wallSlot by cycleAttestationSubnets(), especially
|
||||||
# since it'll try to run early in epochs, avoiding race conditions.
|
# since it'll try to run early in epochs, avoiding race conditions.
|
||||||
|
|
Loading…
Reference in New Issue