From e94417c5005f4e5c462373c5a09bd848070bb91a Mon Sep 17 00:00:00 2001 From: tersec Date: Thu, 19 Sep 2024 05:46:38 +0000 Subject: [PATCH] speed up electra attestation tests by 5x (#6563) --- beacon_chain/rpc/rest_rewards_api.nim | 3 +-- tests/test_attestation_pool.nim | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/beacon_chain/rpc/rest_rewards_api.nim b/beacon_chain/rpc/rest_rewards_api.nim index bd4fa8d7a..1e6aeb331 100644 --- a/beacon_chain/rpc/rest_rewards_api.nim +++ b/beacon_chain/rpc/rest_rewards_api.nim @@ -8,11 +8,10 @@ {.push raises: [].} import - std/[typetraits, sequtils, sets], + std/[typetraits, sets], stew/base10, chronicles, metrics, ./rest_utils, - ./state_ttl_cache, ../beacon_node, ../consensus_object_pools/[blockchain_dag, spec_cache, validator_change_pool], ../spec/[forks, state_transition] diff --git a/tests/test_attestation_pool.nim b/tests/test_attestation_pool.nim index cc9e37993..3ae3a1c40 100644 --- a/tests/test_attestation_pool.nim +++ b/tests/test_attestation_pool.nim @@ -747,7 +747,8 @@ suite "Attestation pool electra processing" & preset(): cfg = genesisTestRuntimeConfig(ConsensusFork.Electra) dag = init( ChainDAGRef, cfg, - makeTestDB(TOTAL_COMMITTEES * TARGET_COMMITTEE_SIZE*SLOTS_PER_EPOCH * 6, cfg = cfg), + makeTestDB( + TOTAL_COMMITTEES * TARGET_COMMITTEE_SIZE * SLOTS_PER_EPOCH, cfg = cfg), validatorMonitor, {}) taskpool = Taskpool.new() verifier = BatchVerifier.init(rng, taskpool) @@ -766,7 +767,6 @@ suite "Attestation pool electra processing" & preset(): info, {}).isOk() - test "Can add and retrieve simple electra attestations" & preset(): let # Create an attestation for slot 1!