speed up electra attestation tests by 5x (#6563)

This commit is contained in:
tersec 2024-09-19 05:46:38 +00:00 committed by GitHub
parent e3fcd8b031
commit e94417c500
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -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]

View File

@ -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!