Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
domiwei committed Apr 22, 2024
1 parent 4d64223 commit a17a24d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cl/phase1/network/services/voluntary_exit_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,8 @@ func (s *voluntaryExitService) ProcessMessage(ctx context.Context, subnet *uint6

// Verify the validator is active
// assert is_active_validator(validator, get_current_epoch(state))
if err := func() error {
validators := state.GetActiveValidatorsIndices(curEpoch)
for _, v := range validators {
if v == voluntaryExit.ValidatorIndex {
return nil
}
}
if !val.Active(curEpoch) {
return fmt.Errorf("validator is not active")
}(); err != nil {
return err
}

// Verify exit has not been initiated
Expand Down

0 comments on commit a17a24d

Please sign in to comment.