mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
Remove TestRandom (#9006)
We have a legacy `TestRandom` trait which generates random types for testing and fuzzing. This function overlaps with `arbitrary` which is used very commonly in the ecosystem. Remove `TestRandom` and generate random type instances using `Arbitrary`. Co-Authored-By: Mac L <mjladson@pm.me> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -11,7 +11,6 @@ use beacon_processor::WorkEvent;
|
||||
use lighthouse_network::rpc::RequestType;
|
||||
use lighthouse_network::service::api_types::{AppRequestId, Id};
|
||||
use lighthouse_network::{NetworkGlobals, PeerId};
|
||||
use rand_chacha::ChaCha20Rng;
|
||||
use slot_clock::ManualSlotClock;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::fs::OpenOptions;
|
||||
@@ -72,9 +71,8 @@ struct TestRig {
|
||||
network_globals: Arc<NetworkGlobals<E>>,
|
||||
/// Beacon chain harness
|
||||
harness: BeaconChainHarness<EphemeralHarnessType<E>>,
|
||||
/// `rng` for generating test blocks and blobs.
|
||||
rng_08: rand_chacha_03::ChaCha20Rng,
|
||||
rng: ChaCha20Rng,
|
||||
unstructured: arbitrary::Unstructured<'static>,
|
||||
fork_name: ForkName,
|
||||
/// Blocks that will be used in the test but may not be known to `harness` yet.
|
||||
network_blocks_by_root: HashMap<Hash256, RangeSyncBlock<E>>,
|
||||
|
||||
Reference in New Issue
Block a user