mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 19:32:55 +00:00
Merge branch 'remove-into-gossip-verified-block' of https://github.com/realbigsean/lighthouse into merge-unstable-deneb-june-6th
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#![cfg(feature = "spec-minimal")]
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::beacon_processor::BeaconProcessorSend;
|
||||
use crate::service::RequestId;
|
||||
use crate::sync::manager::RequestId as SyncId;
|
||||
use crate::NetworkMessage;
|
||||
@@ -80,7 +81,7 @@ impl TestRig {
|
||||
SyncNetworkContext::new(
|
||||
network_tx,
|
||||
globals,
|
||||
beacon_processor_tx,
|
||||
BeaconProcessorSend(beacon_processor_tx),
|
||||
chain,
|
||||
log.new(slog::o!("component" => "network_context")),
|
||||
)
|
||||
|
||||
@@ -38,7 +38,7 @@ use super::block_lookups::{BlockLookups, PeerShouldHave};
|
||||
use super::network_context::{BlockOrBlob, SyncNetworkContext};
|
||||
use super::peer_sync_info::{remote_sync_type, PeerSyncType};
|
||||
use super::range_sync::{RangeSync, RangeSyncType, EPOCHS_PER_BATCH};
|
||||
use crate::beacon_processor::{ChainSegmentProcessId, WorkEvent as BeaconWorkEvent};
|
||||
use crate::beacon_processor::{BeaconProcessorSend, ChainSegmentProcessId};
|
||||
use crate::service::NetworkMessage;
|
||||
use crate::status::ToStatusMessage;
|
||||
use crate::sync::block_lookups::delayed_lookup;
|
||||
@@ -238,7 +238,7 @@ pub fn spawn<T: BeaconChainTypes>(
|
||||
beacon_chain: Arc<BeaconChain<T>>,
|
||||
network_globals: Arc<NetworkGlobals<T::EthSpec>>,
|
||||
network_send: mpsc::UnboundedSender<NetworkMessage<T::EthSpec>>,
|
||||
beacon_processor_send: mpsc::Sender<BeaconWorkEvent<T>>,
|
||||
beacon_processor_send: BeaconProcessorSend<T>,
|
||||
log: slog::Logger,
|
||||
) -> mpsc::UnboundedSender<SyncMessage<T::EthSpec>> {
|
||||
assert!(
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use super::block_sidecar_coupling::BlocksAndBlobsRequestInfo;
|
||||
use super::manager::{Id, RequestId as SyncRequestId};
|
||||
use super::range_sync::{BatchId, ByRangeRequestType, ChainId};
|
||||
use crate::beacon_processor::WorkEvent;
|
||||
use crate::beacon_processor::BeaconProcessorSend;
|
||||
use crate::service::{NetworkMessage, RequestId};
|
||||
use crate::status::ToStatusMessage;
|
||||
use crate::sync::block_lookups::{BlobRequestId, BlockRequestId};
|
||||
@@ -60,7 +60,7 @@ pub struct SyncNetworkContext<T: BeaconChainTypes> {
|
||||
execution_engine_state: EngineState,
|
||||
|
||||
/// Channel to send work to the beacon processor.
|
||||
beacon_processor_send: mpsc::Sender<WorkEvent<T>>,
|
||||
beacon_processor_send: BeaconProcessorSend<T>,
|
||||
|
||||
pub chain: Arc<BeaconChain<T>>,
|
||||
|
||||
@@ -90,7 +90,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
pub fn new(
|
||||
network_send: mpsc::UnboundedSender<NetworkMessage<T::EthSpec>>,
|
||||
network_globals: Arc<NetworkGlobals<T::EthSpec>>,
|
||||
beacon_processor_send: mpsc::Sender<WorkEvent<T>>,
|
||||
beacon_processor_send: BeaconProcessorSend<T>,
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
log: slog::Logger,
|
||||
) -> Self {
|
||||
@@ -564,12 +564,12 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn processor_channel_if_enabled(&self) -> Option<&mpsc::Sender<WorkEvent<T>>> {
|
||||
pub fn processor_channel_if_enabled(&self) -> Option<&BeaconProcessorSend<T>> {
|
||||
self.is_execution_engine_online()
|
||||
.then_some(&self.beacon_processor_send)
|
||||
}
|
||||
|
||||
pub fn processor_channel(&self) -> &mpsc::Sender<WorkEvent<T>> {
|
||||
pub fn processor_channel(&self) -> &BeaconProcessorSend<T> {
|
||||
&self.beacon_processor_send
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use crate::beacon_processor::WorkEvent as BeaconWorkEvent;
|
||||
use crate::beacon_processor::{BeaconProcessorSend, WorkEvent as BeaconWorkEvent};
|
||||
use crate::service::RequestId;
|
||||
use crate::NetworkMessage;
|
||||
use beacon_chain::{
|
||||
@@ -610,7 +610,7 @@ mod tests {
|
||||
let cx = SyncNetworkContext::new(
|
||||
network_tx,
|
||||
globals.clone(),
|
||||
beacon_processor_tx,
|
||||
BeaconProcessorSend(beacon_processor_tx),
|
||||
chain,
|
||||
log.new(o!("component" => "network_context")),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user