mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
Breakup RPCBlock into LookupBlock & RangeSyncBlock (#8860)
Co-Authored-By: Mark Mackey <mark@sigmaprime.io>
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::block_verification::{
|
||||
signature_verify_chain_segment, verify_header_signature,
|
||||
};
|
||||
use crate::block_verification_types::{
|
||||
AsBlock, AvailableExecutedBlock, BlockImportData, ExecutedBlock, RpcBlock,
|
||||
AsBlock, AvailableExecutedBlock, BlockImportData, ExecutedBlock, RangeSyncBlock,
|
||||
};
|
||||
pub use crate::canonical_head::CanonicalHead;
|
||||
use crate::chain_config::ChainConfig;
|
||||
@@ -137,7 +137,7 @@ use types::*;
|
||||
pub type ForkChoiceError = fork_choice::Error<crate::ForkChoiceStoreError>;
|
||||
|
||||
/// Alias to appease clippy.
|
||||
type HashBlockTuple<E> = (Hash256, RpcBlock<E>);
|
||||
type HashBlockTuple<E> = (Hash256, RangeSyncBlock<E>);
|
||||
|
||||
// These keys are all zero because they get stored in different columns, see `DBColumn` type.
|
||||
pub const BEACON_CHAIN_DB_KEY: Hash256 = Hash256::ZERO;
|
||||
@@ -2746,7 +2746,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
/// This method is potentially long-running and should not run on the core executor.
|
||||
pub fn filter_chain_segment(
|
||||
self: &Arc<Self>,
|
||||
chain_segment: Vec<RpcBlock<T::EthSpec>>,
|
||||
chain_segment: Vec<RangeSyncBlock<T::EthSpec>>,
|
||||
) -> Result<Vec<HashBlockTuple<T::EthSpec>>, Box<ChainSegmentResult>> {
|
||||
// This function will never import any blocks.
|
||||
let imported_blocks = vec![];
|
||||
@@ -2855,7 +2855,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
/// `Self::process_block`.
|
||||
pub async fn process_chain_segment(
|
||||
self: &Arc<Self>,
|
||||
chain_segment: Vec<RpcBlock<T::EthSpec>>,
|
||||
chain_segment: Vec<RangeSyncBlock<T::EthSpec>>,
|
||||
notify_execution_layer: NotifyExecutionLayer,
|
||||
) -> ChainSegmentResult {
|
||||
for block in chain_segment.iter() {
|
||||
|
||||
Reference in New Issue
Block a user