Skip to content

Commit a263157

Browse files
committed
Improve tests
1 parent ff5edd0 commit a263157

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

beacon_node/beacon_chain/tests/store_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ async fn proposer_lookahead_gloas_fork_epoch() {
15711571
let store = get_store_generic(&db_path, Default::default(), spec.clone());
15721572
let validators_keypairs =
15731573
types::test_utils::generate_deterministic_keypairs(LOW_VALIDATOR_COUNT);
1574-
let harness = TestHarness::builder(MinimalEthSpec)
1574+
let harness = TestHarness::builder(E::default())
15751575
.spec(spec.into())
15761576
.keypairs(validators_keypairs)
15771577
.fresh_disk_store(store)

beacon_node/http_api/tests/interactive_tests.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,10 @@ async fn queue_attestations_from_http() {
946946
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
947947
async fn proposer_duties_with_gossip_tolerance() {
948948
let validator_count = 24;
949-
let spec = ForkName::Fulu.make_genesis_spec(E::default_spec());
950949

951-
let tester = InteractiveTester::<E>::new(Some(spec.clone()), validator_count).await;
950+
let tester = InteractiveTester::<E>::new(None, validator_count).await;
952951
let harness = &tester.harness;
952+
let spec = &harness.spec;
953953
let client = &tester.client;
954954

955955
let num_initial = 4 * E::slots_per_epoch() - 1;
@@ -991,7 +991,7 @@ async fn proposer_duties_with_gossip_tolerance() {
991991
// To trigger it, we need to prime the proposer shuffling cache with an incorrect entry which
992992
// the previous code would be liable to lookup due to the bugs in its decision root calculation.
993993
let wrong_decision_root = head_state
994-
.proposer_shuffling_decision_root(head_block_root, &spec)
994+
.proposer_shuffling_decision_root(head_block_root, spec)
995995
.unwrap();
996996
let wrong_proposer_indices = vec![0; E::slots_per_epoch() as usize];
997997
harness
@@ -1015,7 +1015,11 @@ async fn proposer_duties_with_gossip_tolerance() {
10151015
assert_eq!(
10161016
proposer_duties_tolerant_current_epoch.dependent_root,
10171017
head_state
1018-
.proposer_shuffling_decision_root_at_epoch(tolerant_current_epoch, Hash256::ZERO, &spec)
1018+
.proposer_shuffling_decision_root_at_epoch(
1019+
tolerant_current_epoch,
1020+
head_block_root,
1021+
spec
1022+
)
10191023
.unwrap()
10201024
);
10211025
assert_ne!(

0 commit comments

Comments
 (0)