mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Merge branch 'unstable' into merge-unstable-to-deneb-20230808
# Conflicts: # Cargo.lock # beacon_node/beacon_chain/src/lib.rs # beacon_node/execution_layer/src/engine_api.rs # beacon_node/execution_layer/src/engine_api/http.rs # beacon_node/execution_layer/src/test_utils/mod.rs # beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs # beacon_node/lighthouse_network/src/rpc/handler.rs # beacon_node/lighthouse_network/src/rpc/protocol.rs # beacon_node/lighthouse_network/src/service/utils.rs # beacon_node/lighthouse_network/tests/rpc_tests.rs # beacon_node/network/Cargo.toml # beacon_node/network/src/network_beacon_processor/tests.rs # lcli/src/parse_ssz.rs # scripts/cross/Dockerfile # validator_client/src/block_service.rs # validator_client/src/validator_store.rs
This commit is contained in:
@@ -687,7 +687,8 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
work_reprocessing_rx: mpsc::Receiver<ReprocessQueueMessage>,
|
||||
work_journal_tx: Option<mpsc::Sender<&'static str>>,
|
||||
slot_clock: S,
|
||||
) {
|
||||
maximum_gossip_clock_disparity: Duration,
|
||||
) -> Result<(), String> {
|
||||
// Used by workers to communicate that they are finished a task.
|
||||
let (idle_tx, idle_rx) = mpsc::channel::<()>(MAX_IDLE_QUEUE_LEN);
|
||||
|
||||
@@ -747,13 +748,15 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
// receive them back once they are ready (`ready_work_rx`).
|
||||
let (ready_work_tx, ready_work_rx) =
|
||||
mpsc::channel::<ReadyWork>(MAX_SCHEDULED_WORK_QUEUE_LEN);
|
||||
|
||||
spawn_reprocess_scheduler(
|
||||
ready_work_tx,
|
||||
work_reprocessing_rx,
|
||||
&self.executor,
|
||||
slot_clock,
|
||||
self.log.clone(),
|
||||
);
|
||||
maximum_gossip_clock_disparity,
|
||||
)?;
|
||||
|
||||
let executor = self.executor.clone();
|
||||
|
||||
@@ -1255,6 +1258,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
|
||||
// Spawn on the core executor.
|
||||
executor.spawn(manager_future, MANAGER_TASK_NAME);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Spawns a blocking worker thread to process some `Work`.
|
||||
|
||||
@@ -361,7 +361,12 @@ pub fn spawn_reprocess_scheduler<S: SlotClock + 'static>(
|
||||
executor: &TaskExecutor,
|
||||
slot_clock: S,
|
||||
log: Logger,
|
||||
) {
|
||||
maximum_gossip_clock_disparity: Duration,
|
||||
) -> Result<(), String> {
|
||||
// Sanity check
|
||||
if ADDITIONAL_QUEUED_BLOCK_DELAY >= maximum_gossip_clock_disparity {
|
||||
return Err("The block delay and gossip disparity don't match.".to_string());
|
||||
}
|
||||
let mut queue = ReprocessQueue {
|
||||
work_reprocessing_rx,
|
||||
ready_work_tx,
|
||||
@@ -400,6 +405,7 @@ pub fn spawn_reprocess_scheduler<S: SlotClock + 'static>(
|
||||
},
|
||||
TASK_NAME,
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
impl<S: SlotClock> ReprocessQueue<S> {
|
||||
|
||||
Reference in New Issue
Block a user