mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-01 05:37:05 +00:00
Breakup RPCBlock into LookupBlock & RangeSyncBlock (#8860)
Co-Authored-By: Mark Mackey <mark@sigmaprime.io>
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::sync::manager::BatchProcessResult;
|
||||
use crate::sync::network_context::{
|
||||
RangeRequestId, RpcRequestSendError, RpcResponseError, SyncNetworkContext,
|
||||
};
|
||||
use beacon_chain::block_verification_types::RpcBlock;
|
||||
use beacon_chain::block_verification_types::RangeSyncBlock;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use lighthouse_network::service::api_types::Id;
|
||||
use lighthouse_network::types::{BackFillState, NetworkGlobals};
|
||||
@@ -55,7 +55,7 @@ const MAX_BATCH_DOWNLOAD_ATTEMPTS: u8 = 10;
|
||||
/// after `MAX_BATCH_PROCESSING_ATTEMPTS` times, it is considered faulty.
|
||||
const MAX_BATCH_PROCESSING_ATTEMPTS: u8 = 10;
|
||||
|
||||
type RpcBlocks<E> = Vec<RpcBlock<E>>;
|
||||
type RpcBlocks<E> = Vec<RangeSyncBlock<E>>;
|
||||
|
||||
type BackFillBatchInfo<E> = BatchInfo<E, BackFillBatchConfig<E>, RpcBlocks<E>>;
|
||||
|
||||
@@ -390,7 +390,7 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
batch_id: BatchId,
|
||||
peer_id: &PeerId,
|
||||
request_id: Id,
|
||||
blocks: Vec<RpcBlock<T::EthSpec>>,
|
||||
blocks: Vec<RangeSyncBlock<T::EthSpec>>,
|
||||
) -> Result<ProcessResult, BackFillError> {
|
||||
// check if we have this batch
|
||||
let Some(batch) = self.batches.get_mut(&batch_id) else {
|
||||
|
||||
Reference in New Issue
Block a user