Skip to content

Commit

Permalink
Fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain committed Sep 19, 2023
1 parent 18376d9 commit caae3c7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions testing/endtoend/evaluators/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import (
"google.golang.org/protobuf/types/known/emptypb"
)

// churnLimit is normally 4 unless the validator set is extremely large.
var churnLimit = 4
var depositValCount = e2e.DepositCount
var numOfExits = 2

Expand All @@ -39,7 +37,7 @@ var depositsInBlockStart = params.E2ETestConfig().EpochsPerEth1VotingPeriod * 2

// deposits included + finalization + MaxSeedLookahead for activation.
var depositActivationStartEpoch = depositsInBlockStart + 2 + params.E2ETestConfig().MaxSeedLookahead
var depositEndEpoch = depositActivationStartEpoch + primitives.Epoch(math.Ceil(float64(depositValCount)/float64(churnLimit)))
var depositEndEpoch = depositActivationStartEpoch + primitives.Epoch(math.Ceil(float64(depositValCount)/float64(params.BeaconConfig().MinPerEpochChurnLimit)))
var exitSubmissionEpoch = primitives.Epoch(7)

// ProcessesDepositsInBlocks ensures the expected amount of deposits are accepted into blocks.
Expand Down Expand Up @@ -249,8 +247,8 @@ func activatesDepositedValidators(ec *e2etypes.EvaluationContext, conns ...*grpc
return fmt.Errorf("missing %d validators for post-genesis deposits", len(expected))
}

if deposits != churnLimit {
return fmt.Errorf("expected %d deposits to be processed in epoch %d, received %d", churnLimit, epoch, deposits)
if deposits != int(params.BeaconConfig().MinPerEpochChurnLimit) {
return fmt.Errorf("expected %d deposits to be processed in epoch %d, received %d", params.BeaconConfig().MinPerEpochChurnLimit, epoch, deposits)
}

if lowBalance > 0 {
Expand Down

0 comments on commit caae3c7

Please sign in to comment.