mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-27 01:33:33 +00:00
Fix conflicts rebasing eip4844
This commit is contained in:
@@ -18,6 +18,7 @@ use lazy_static::lazy_static;
|
||||
use logging::test_logger;
|
||||
use maplit::hashset;
|
||||
use rand::Rng;
|
||||
use slot_clock::TestingSlotClock;
|
||||
use state_processing::BlockReplayer;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
@@ -44,7 +45,7 @@ lazy_static! {
|
||||
}
|
||||
|
||||
type E = MinimalEthSpec;
|
||||
type TestHarness = BeaconChainHarness<DiskHarnessType<E>>;
|
||||
type TestHarness = BeaconChainHarness<DiskHarnessType<E, TestingSlotClock>>;
|
||||
|
||||
fn get_store(db_path: &TempDir) -> Arc<HotColdDB<E, LevelDB<E>, LevelDB<E>>> {
|
||||
get_store_with_spec(db_path, test_spec::<E>())
|
||||
@@ -67,7 +68,7 @@ fn get_harness(
|
||||
store: Arc<HotColdDB<E, LevelDB<E>, LevelDB<E>>>,
|
||||
validator_count: usize,
|
||||
) -> TestHarness {
|
||||
let harness = BeaconChainHarness::builder(MinimalEthSpec)
|
||||
let harness = TestHarness::builder(MinimalEthSpec)
|
||||
.default_spec()
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
.fresh_disk_store(store)
|
||||
@@ -567,7 +568,7 @@ async fn delete_blocks_and_states() {
|
||||
let store = get_store(&db_path);
|
||||
let validators_keypairs =
|
||||
types::test_utils::generate_deterministic_keypairs(LOW_VALIDATOR_COUNT);
|
||||
let harness = BeaconChainHarness::builder(MinimalEthSpec)
|
||||
let harness = TestHarness::builder(MinimalEthSpec)
|
||||
.default_spec()
|
||||
.keypairs(validators_keypairs)
|
||||
.fresh_disk_store(store.clone())
|
||||
@@ -697,7 +698,7 @@ async fn multi_epoch_fork_valid_blocks_test(
|
||||
let store = get_store(&db_path);
|
||||
let validators_keypairs =
|
||||
types::test_utils::generate_deterministic_keypairs(LOW_VALIDATOR_COUNT);
|
||||
let harness = BeaconChainHarness::builder(MinimalEthSpec)
|
||||
let harness = TestHarness::builder(MinimalEthSpec)
|
||||
.default_spec()
|
||||
.keypairs(validators_keypairs)
|
||||
.fresh_disk_store(store)
|
||||
@@ -2109,7 +2110,7 @@ async fn weak_subjectivity_sync() {
|
||||
|
||||
// Initialise a new beacon chain from the finalized checkpoint
|
||||
let beacon_chain = Arc::new(
|
||||
BeaconChainBuilder::new(MinimalEthSpec)
|
||||
BeaconChainBuilder::<DiskHarnessType<E, TestingSlotClock>>::new(MinimalEthSpec)
|
||||
.store(store.clone())
|
||||
.custom_spec(test_spec::<E>())
|
||||
.task_executor(harness.chain.task_executor.clone())
|
||||
@@ -2306,12 +2307,13 @@ async fn finalizes_after_resuming_from_db() {
|
||||
|
||||
let original_chain = harness.chain;
|
||||
|
||||
let resumed_harness = BeaconChainHarness::builder(MinimalEthSpec)
|
||||
.default_spec()
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
.resumed_disk_store(store)
|
||||
.mock_execution_layer()
|
||||
.build();
|
||||
let resumed_harness =
|
||||
BeaconChainHarness::<DiskHarnessType<E, TestingSlotClock>>::builder(MinimalEthSpec)
|
||||
.default_spec()
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
.resumed_disk_store(store)
|
||||
.mock_execution_layer()
|
||||
.build();
|
||||
|
||||
assert_chains_pretty_much_the_same(&original_chain, &resumed_harness.chain);
|
||||
|
||||
@@ -2482,7 +2484,7 @@ async fn revert_minority_fork_on_resume() {
|
||||
drop(harness1);
|
||||
let resume_store = get_store_with_spec(&db_path1, spec2.clone());
|
||||
|
||||
let resumed_harness = BeaconChainHarness::builder(MinimalEthSpec)
|
||||
let resumed_harness = TestHarness::builder(MinimalEthSpec)
|
||||
.spec(spec2)
|
||||
.keypairs(KEYPAIRS[0..validator_count].to_vec())
|
||||
.resumed_disk_store(resume_store)
|
||||
|
||||
Reference in New Issue
Block a user