@@ -46,7 +46,7 @@ suite "Block pool processing" & preset():
4646 rng = HmacDrbgContext .new ()
4747 cfg = defaultRuntimeConfig
4848 var
49- db = makeTestDB (SLOTS_PER_EPOCH , cfg = cfg )
49+ db = cfg. makeTestDB (SLOTS_PER_EPOCH )
5050 validatorMonitor = newClone (ValidatorMonitor .init ())
5151 dag = init (ChainDAGRef , cfg, db, validatorMonitor, {})
5252 taskpool = Taskpool .new ()
@@ -282,7 +282,7 @@ suite "Block pool altair processing" & preset():
282282 res.ALTAIR_FORK_EPOCH = Epoch (1 )
283283 res
284284 var
285- db = makeTestDB (SLOTS_PER_EPOCH , cfg = cfg )
285+ db = cfg. makeTestDB (SLOTS_PER_EPOCH )
286286 validatorMonitor = newClone (ValidatorMonitor .init ())
287287 dag = init (ChainDAGRef , cfg, db, validatorMonitor, {})
288288 taskpool = Taskpool .new ()
@@ -359,7 +359,7 @@ suite "chain DAG finalization tests" & preset():
359359 rng = HmacDrbgContext .new ()
360360 cfg = defaultRuntimeConfig
361361 var
362- db = makeTestDB (SLOTS_PER_EPOCH , cfg = cfg )
362+ db = cfg. makeTestDB (SLOTS_PER_EPOCH )
363363 validatorMonitor = newClone (ValidatorMonitor .init ())
364364 dag = init (ChainDAGRef , cfg, db, validatorMonitor, {})
365365 taskpool = Taskpool .new ()
@@ -713,7 +713,7 @@ suite "Diverging hardforks":
713713 res.ALTAIR_FORK_EPOCH = 2 .Epoch
714714 res
715715 var
716- db = makeTestDB (SLOTS_PER_EPOCH , cfg = phase0RuntimeConfig )
716+ db = phase0RuntimeConfig. makeTestDB (SLOTS_PER_EPOCH )
717717 validatorMonitor = newClone (ValidatorMonitor .init ())
718718 dag = init (ChainDAGRef , phase0RuntimeConfig, db, validatorMonitor, {})
719719 taskpool = Taskpool .new ()
@@ -1170,7 +1170,7 @@ suite "Latest valid hash" & preset():
11701170 res.BELLATRIX_FORK_EPOCH = 2 .Epoch
11711171 res
11721172 var
1173- db = makeTestDB (SLOTS_PER_EPOCH , cfg = cfg )
1173+ db = cfg. makeTestDB (SLOTS_PER_EPOCH )
11741174 validatorMonitor = newClone (ValidatorMonitor .init ())
11751175 dag = init (ChainDAGRef , cfg, db, validatorMonitor, {})
11761176 taskpool = Taskpool .new ()
@@ -1237,7 +1237,7 @@ suite "Pruning":
12371237 res.MIN_EPOCHS_FOR_BLOCK_REQUESTS = res.safeMinEpochsForBlockRequests ()
12381238 doAssert res.MIN_EPOCHS_FOR_BLOCK_REQUESTS == 4
12391239 res
1240- db = makeTestDB (SLOTS_PER_EPOCH , cfg = cfg )
1240+ db = cfg. makeTestDB (SLOTS_PER_EPOCH )
12411241 validatorMonitor = newClone (ValidatorMonitor .init ())
12421242 dag = init (ChainDAGRef , cfg, db, validatorMonitor, {})
12431243 tmpState = assignClone (dag.headState)
@@ -1292,7 +1292,7 @@ suite "State history":
12921292 cfg = defaultRuntimeConfig
12931293 validatorMonitor = newClone (ValidatorMonitor .init ())
12941294 dag = ChainDAGRef .init (
1295- cfg, makeTestDB (numValidators, cfg = cfg ),
1295+ cfg, cfg. makeTestDB (numValidators),
12961296 validatorMonitor, {})
12971297 quarantine = newClone (Quarantine .init (dag.cfg))
12981298 rng = HmacDrbgContext .new ()
@@ -1413,7 +1413,7 @@ suite "Ancestry":
14131413 cfg = defaultRuntimeConfig
14141414 validatorMonitor = newClone (ValidatorMonitor .init ())
14151415 dag = ChainDAGRef .init (
1416- cfg, makeTestDB (numValidators, cfg = cfg ),
1416+ cfg, cfg. makeTestDB (numValidators),
14171417 validatorMonitor, {})
14181418 quarantine = newClone (Quarantine .init (dag.cfg))
14191419 rng = HmacDrbgContext .new ()
@@ -1706,9 +1706,8 @@ template runShufflingTests(cfg: RuntimeConfig, numRandomTests: int) =
17061706 deposit_count: deposits.lenu64)
17071707 validatorMonitor = newClone (ValidatorMonitor .init ())
17081708 dag = ChainDAGRef .init (
1709- cfg, makeTestDB (
1710- numValidators, eth1Data = Opt .some (eth1Data),
1711- flags = {}, cfg = cfg),
1709+ cfg, cfg.makeTestDB (
1710+ numValidators, eth1Data = Opt .some (eth1Data), flags = {}),
17121711 validatorMonitor, {})
17131712 quarantine = newClone (Quarantine .init (dag.cfg))
17141713 rng = HmacDrbgContext .new ()
0 commit comments