mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
Merge remote-tracking branch 'origin/stable' into unstable
This commit is contained in:
@@ -42,6 +42,7 @@ use parking_lot::{Mutex, RwLockWriteGuard};
|
||||
use rand::Rng;
|
||||
use rand::SeedableRng;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::seq::SliceRandom;
|
||||
use rayon::prelude::*;
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use slot_clock::{SlotClock, TestingSlotClock};
|
||||
@@ -59,6 +60,7 @@ use store::{HotColdDB, ItemStore, MemoryStore, config::StoreConfig};
|
||||
use task_executor::TaskExecutor;
|
||||
use task_executor::{ShutdownReason, test_utils::TestRuntime};
|
||||
use tree_hash::TreeHash;
|
||||
use types::data_column_custody_group::CustodyIndex;
|
||||
use types::indexed_attestation::IndexedAttestationBase;
|
||||
use types::payload::BlockProductionVersion;
|
||||
use types::test_utils::TestRandom;
|
||||
@@ -576,6 +578,7 @@ where
|
||||
.shutdown_sender(shutdown_tx)
|
||||
.chain_config(chain_config)
|
||||
.node_custody_type(self.node_custody_type)
|
||||
.ordered_custody_column_indices(generate_data_column_indices_rand_order::<E>())
|
||||
.event_handler(Some(ServerSentEventHandler::new_with_capacity(5)))
|
||||
.validator_monitor_config(validator_monitor_config)
|
||||
.rng(Box::new(StdRng::seed_from_u64(42)));
|
||||
@@ -605,15 +608,6 @@ where
|
||||
|
||||
let chain = builder.build().expect("should build");
|
||||
|
||||
chain
|
||||
.data_availability_checker
|
||||
.custody_context()
|
||||
.init_ordered_data_columns_from_custody_groups(
|
||||
(0..spec.number_of_custody_groups).collect(),
|
||||
&spec,
|
||||
)
|
||||
.expect("should initialise custody context");
|
||||
|
||||
BeaconChainHarness {
|
||||
spec: chain.spec.clone(),
|
||||
chain: Arc::new(chain),
|
||||
@@ -3393,3 +3387,9 @@ pub fn generate_data_column_sidecars_from_block<E: EthSpec>(
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn generate_data_column_indices_rand_order<E: EthSpec>() -> Vec<CustodyIndex> {
|
||||
let mut indices = (0..E::number_of_columns() as u64).collect::<Vec<_>>();
|
||||
indices.shuffle(&mut StdRng::seed_from_u64(42));
|
||||
indices
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user