mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +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:
@@ -521,7 +521,7 @@ fn publish_column_sidecars<T: BeaconChainTypes>(
|
||||
.len()
|
||||
.saturating_sub(malicious_withhold_count);
|
||||
// Randomize columns before dropping the last malicious_withhold_count items
|
||||
data_column_sidecars.shuffle(&mut rand::thread_rng());
|
||||
data_column_sidecars.shuffle(&mut **chain.rng.lock());
|
||||
data_column_sidecars.truncate(columns_to_keep);
|
||||
}
|
||||
let pubsub_messages = data_column_sidecars
|
||||
|
||||
Reference in New Issue
Block a user