mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
#6296: Deterministic RNG in peer DAS publish block tests Made test functions to call publish-block APIs with true for the deterministic RNG boolean parameter while production code with false. This will deterministically shuffle columns for unit tests under broadcast_validation_tests.rs.
This commit is contained in:
@@ -7,6 +7,8 @@ use beacon_chain::{
|
||||
};
|
||||
use genesis::{generate_deterministic_keypairs, interop_genesis_state, DEFAULT_ETH1_BLOCK_HASH};
|
||||
use lighthouse_network::NetworkConfig;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::SeedableRng;
|
||||
use slot_clock::{SlotClock, SystemTimeSlotClock};
|
||||
use std::sync::{Arc, LazyLock};
|
||||
use std::time::{Duration, SystemTime};
|
||||
@@ -76,6 +78,7 @@ impl TestBeaconChain {
|
||||
Duration::from_millis(SLOT_DURATION_MILLIS),
|
||||
))
|
||||
.shutdown_sender(shutdown_tx)
|
||||
.rng(Box::new(StdRng::seed_from_u64(42)))
|
||||
.build()
|
||||
.expect("should build"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user