mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 22:04:44 +00:00
Remove reprocess channel (#7437)
Partially https://github.com/sigp/lighthouse/issues/6291 This PR removes the reprocess event channel from being externally exposed. All work events are now sent through the single `BeaconProcessorSend` channel. I've introduced a new `Work::Reprocess` enum variant which we then use to schedule jobs for reprocess. I've also created a new scheduler module which will eventually house the different scheduler impls. This is all needed as an initial step to generalize the beacon processor A "full" implementation for the generalized beacon processor can be found here https://github.com/sigp/lighthouse/pull/6448 I'm going to try to break up the full implementation into smaller PR's so it can actually be reviewed
This commit is contained in:
@@ -6,7 +6,7 @@ use crate::router::{Router, RouterMessage};
|
||||
use crate::subnet_service::{SubnetService, SubnetServiceMessage, Subscription};
|
||||
use crate::NetworkConfig;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use beacon_processor::{work_reprocessing_queue::ReprocessQueueMessage, BeaconProcessorSend};
|
||||
use beacon_processor::BeaconProcessorSend;
|
||||
use futures::channel::mpsc::Sender;
|
||||
use futures::future::OptionFuture;
|
||||
use futures::prelude::*;
|
||||
@@ -211,7 +211,6 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
executor: task_executor::TaskExecutor,
|
||||
libp2p_registry: Option<&'_ mut Registry>,
|
||||
beacon_processor_send: BeaconProcessorSend<T::EthSpec>,
|
||||
beacon_processor_reprocess_tx: mpsc::Sender<ReprocessQueueMessage>,
|
||||
) -> Result<
|
||||
(
|
||||
NetworkService<T>,
|
||||
@@ -315,7 +314,6 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
executor.clone(),
|
||||
invalid_block_storage,
|
||||
beacon_processor_send,
|
||||
beacon_processor_reprocess_tx,
|
||||
fork_context.clone(),
|
||||
)?;
|
||||
|
||||
@@ -367,7 +365,6 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
executor: task_executor::TaskExecutor,
|
||||
libp2p_registry: Option<&'_ mut Registry>,
|
||||
beacon_processor_send: BeaconProcessorSend<T::EthSpec>,
|
||||
beacon_processor_reprocess_tx: mpsc::Sender<ReprocessQueueMessage>,
|
||||
) -> Result<(Arc<NetworkGlobals<T::EthSpec>>, NetworkSenders<T::EthSpec>), String> {
|
||||
let (network_service, network_globals, network_senders) = Self::build(
|
||||
beacon_chain,
|
||||
@@ -375,7 +372,6 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
executor.clone(),
|
||||
libp2p_registry,
|
||||
beacon_processor_send,
|
||||
beacon_processor_reprocess_tx,
|
||||
)
|
||||
.await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user