From 44ba1f7fd5ecf257a1c0dc278cb7785a45b5dde0 Mon Sep 17 00:00:00 2001 From: Jihoon Song Date: Sat, 27 Jul 2024 09:05:58 +0900 Subject: [PATCH] Create a smaller set of validators for faster unit test --- beacon-chain/core/helpers/payload_attestation_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/beacon-chain/core/helpers/payload_attestation_test.go b/beacon-chain/core/helpers/payload_attestation_test.go index 6a5ca1ae1434..3ffa5189152f 100644 --- a/beacon-chain/core/helpers/payload_attestation_test.go +++ b/beacon-chain/core/helpers/payload_attestation_test.go @@ -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) @@ -306,7 +305,7 @@ func TestIsValidIndexedPayloadAttestation(t *testing.T) { }, { attestation: ðpb.IndexedPayloadAttestation{ - AttestingIndices: []primitives.ValidatorIndex{123, 456, 789}, + AttestingIndices: []primitives.ValidatorIndex{123, 234, 345}, Data: ð.PayloadAttestationData{ BeaconBlockRoot: make([]byte, fieldparams.RootLength), },