From 288540e794f62d544e0630881f460242c152ebca Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 26 Jun 2024 08:48:49 +0000 Subject: [PATCH] fix UnnamedBreak deprecation build warnings (#6388) --- .../consensus_object_pools/spec_cache.nim | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/beacon_chain/consensus_object_pools/spec_cache.nim b/beacon_chain/consensus_object_pools/spec_cache.nim index 650d1b898..323546559 100644 --- a/beacon_chain/consensus_object_pools/spec_cache.nim +++ b/beacon_chain/consensus_object_pools/spec_cache.nim @@ -123,21 +123,21 @@ iterator get_attesting_indices*(shufflingRef: ShufflingRef, iterator get_attesting_indices*( dag: ChainDAGRef, attestation: phase0.TrustedAttestation, on_chain: static bool = true): ValidatorIndex = - block: # `return` is not allowed in an inline iterator + block gaiBlock: # `return` is not allowed in an inline iterator let slot = check_attestation_slot_target(attestation.data).valueOr: warn "Invalid attestation slot in trusted attestation", attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock blck = dag.getBlockRef(attestation.data.beacon_block_root).valueOr: # Attestation block unknown - this is fairly common because we # discard alternative histories on restart debug "Pruned block in trusted attestation", attestation = shortLog(attestation) - break + break gaiBlock target = blck.atCheckpoint(attestation.data.target).valueOr: # This may happen when there's no block at the epoch boundary slot @@ -148,7 +148,7 @@ iterator get_attesting_indices*( blck = shortLog(blck), attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock shufflingRef = dag.getShufflingRef(target.blck, target.slot.epoch, false).valueOr: warn "Attestation shuffling not found", @@ -156,7 +156,7 @@ iterator get_attesting_indices*( attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock committeesPerSlot = get_committee_count_per_slot(shufflingRef) committeeIndex = @@ -166,7 +166,7 @@ iterator get_attesting_indices*( attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock for validator in get_attesting_indices( shufflingRef, slot, committeeIndex, attestation.aggregation_bits): @@ -175,21 +175,21 @@ iterator get_attesting_indices*( iterator get_attesting_indices*( dag: ChainDAGRef, attestation: electra.TrustedAttestation, on_chain: static bool): ValidatorIndex = - block: # `return` is not allowed in an inline iterator + block gaiBlock: # `return` is not allowed in an inline iterator let slot = check_attestation_slot_target(attestation.data).valueOr: warn "Invalid attestation slot in trusted attestation", attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock blck = dag.getBlockRef(attestation.data.beacon_block_root).valueOr: # Attestation block unknown - this is fairly common because we # discard alternative histories on restart debug "Pruned block in trusted attestation", attestation = shortLog(attestation) - break + break gaiBlock target = blck.atCheckpoint(attestation.data.target).valueOr: # This may happen when there's no block at the epoch boundary slot @@ -200,7 +200,7 @@ iterator get_attesting_indices*( blck = shortLog(blck), attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock shufflingRef = dag.getShufflingRef(target.blck, target.slot.epoch, false).valueOr: warn "Attestation shuffling not found", @@ -208,7 +208,7 @@ iterator get_attesting_indices*( attestation = shortLog(attestation) doAssert strictVerification notin dag.updateFlags - break + break gaiBlock for validator in get_attesting_indices( shufflingRef, slot, attestation.committee_bits,