mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Add more range sync tests (#6872)
Currently we have very poor coverage of range sync with unit tests. With the event driven test framework we could cover much more ground and be confident when modifying the code.
Add two basic cases:
- Happy path, complete a finalized sync for 2 epochs
- Post-PeerDAS case where we start without enough custody peers and later we find enough
⚠️ If you have ideas for more test cases, please let me know! I'll write them
This commit is contained in:
@@ -7,12 +7,13 @@ use beacon_chain::eth1_chain::CachingEth1Backend;
|
||||
use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType};
|
||||
use beacon_processor::WorkEvent;
|
||||
use lighthouse_network::NetworkGlobals;
|
||||
use rand_chacha::ChaCha20Rng;
|
||||
use slog::Logger;
|
||||
use slot_clock::ManualSlotClock;
|
||||
use std::sync::Arc;
|
||||
use store::MemoryStore;
|
||||
use tokio::sync::mpsc;
|
||||
use types::{test_utils::XorShiftRng, ChainSpec, ForkName, MinimalEthSpec as E};
|
||||
use types::{ChainSpec, ForkName, MinimalEthSpec as E};
|
||||
|
||||
mod lookups;
|
||||
mod range;
|
||||
@@ -61,7 +62,7 @@ struct TestRig {
|
||||
/// Beacon chain harness
|
||||
harness: BeaconChainHarness<EphemeralHarnessType<E>>,
|
||||
/// `rng` for generating test blocks and blobs.
|
||||
rng: XorShiftRng,
|
||||
rng: ChaCha20Rng,
|
||||
fork_name: ForkName,
|
||||
log: Logger,
|
||||
spec: Arc<ChainSpec>,
|
||||
|
||||
Reference in New Issue
Block a user