@@ -719,6 +719,7 @@ func (t *Task) checkBlockDepositRequests(block *consensus.Block, blockData *spec
719719 expectedWithdrawalCreds = common .FromHex (expectedDepositRequest .WithdrawalCredentials )
720720 }
721721
722+ requestLoop:
722723 for _ , depositRequest := range depositRequests {
723724 if expectedDepositRequest .PublicKey == "" || depositRequest .Pubkey .String () == expectedDepositRequest .PublicKey {
724725 depositAmount := big .NewInt (int64 (depositRequest .Amount ))
@@ -730,9 +731,8 @@ func (t *Task) checkBlockDepositRequests(block *consensus.Block, blockData *spec
730731 t .logger .Warnf ("check failed: deposit request found, but amount does not match (have: %v, want: %v)" , depositAmount , expectedDepositRequest .Amount .String ())
731732 default :
732733 found = true
734+ break requestLoop
733735 }
734-
735- break
736736 }
737737 }
738738
@@ -773,6 +773,7 @@ func (t *Task) checkBlockWithdrawalRequests(block *consensus.Block, blockData *s
773773 expectedPubKey = common .FromHex (expectedWithdrawalRequest .ValidatorPubkey )
774774 }
775775
776+ requestLoop:
776777 for _ , withdrawalRequest := range withdrawalRequests {
777778 if expectedWithdrawalRequest .ValidatorPubkey == "" || bytes .Equal (withdrawalRequest .ValidatorPubkey [:], expectedPubKey ) {
778779 withdrawalAmount := big .NewInt (int64 (withdrawalRequest .Amount ))
@@ -784,9 +785,8 @@ func (t *Task) checkBlockWithdrawalRequests(block *consensus.Block, blockData *s
784785 t .logger .Warnf ("check failed: deposit request found, but amount does not match (have: %v, want: %v)" , withdrawalAmount , expectedWithdrawalRequest .Amount .String ())
785786 default :
786787 found = true
788+ break requestLoop
787789 }
788-
789- break
790790 }
791791 }
792792
@@ -831,6 +831,7 @@ func (t *Task) checkBlockConsolidationRequests(block *consensus.Block, blockData
831831 expectedTgtPubKey = common .FromHex (expectedConsolidationRequest .TargetPubkey )
832832 }
833833
834+ requestLoop:
834835 for _ , consolidationRequest := range consolidationRequests {
835836 if expectedConsolidationRequest .SourcePubkey == "" || bytes .Equal (consolidationRequest .SourcePubkey [:], expectedSrcPubKey ) {
836837 switch {
@@ -841,9 +842,8 @@ func (t *Task) checkBlockConsolidationRequests(block *consensus.Block, blockData
841842
842843 default :
843844 found = true
845+ break requestLoop
844846 }
845-
846- break
847847 }
848848 }
849849
0 commit comments