Skip to content

Commit

Permalink
Create a smaller set of validators for faster unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jihoonsong committed Jul 27, 2024
1 parent 206e226 commit 44ba1f7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions beacon-chain/core/helpers/payload_attestation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ func TestGetIndexedPayloadAttestation(t *testing.T) {
func TestIsValidIndexedPayloadAttestation(t *testing.T) {
helpers.ClearCache()

// Create 10 committees. Total 40960 validators.
committeeCount := uint64(10)
validatorCount := committeeCount * params.BeaconConfig().TargetCommitteeSize * uint64(params.BeaconConfig().SlotsPerEpoch)
// Create validators.
validatorCount := uint64(350)
validators := make([]*ethpb.Validator, validatorCount)
_, secretKeys, err := util.DeterministicDepositsAndKeys(validatorCount)
require.NoError(t, err)
Expand Down Expand Up @@ -306,7 +305,7 @@ func TestIsValidIndexedPayloadAttestation(t *testing.T) {
},
{
attestation: &ethpb.IndexedPayloadAttestation{
AttestingIndices: []primitives.ValidatorIndex{123, 456, 789},
AttestingIndices: []primitives.ValidatorIndex{123, 234, 345},
Data: &eth.PayloadAttestationData{
BeaconBlockRoot: make([]byte, fieldparams.RootLength),
},
Expand Down

0 comments on commit 44ba1f7

Please sign in to comment.