chore(reth-network-p2p): Replace HeadersClient + BodiesClient with BlockClient (#10058)

Co-authored-by: Skanda Bhat <bhat.skanda.m@gmail.com>
This commit is contained in:
nk_ysg
2024-08-05 00:20:53 +08:00
committed by GitHub
parent a824735ade
commit 9c80cc4a57
3 changed files with 17 additions and 14 deletions

View File

@ -11,6 +11,7 @@ use reth_network_p2p::{
bodies::client::BodiesClient,
headers::client::HeadersClient,
sync::{NetworkSyncUpdater, SyncState},
BlockClient,
};
use reth_payload_builder::PayloadBuilderHandle;
use reth_payload_primitives::{PayloadAttributes, PayloadBuilderAttributes};
@ -171,7 +172,7 @@ type PendingForkchoiceUpdate<PayloadAttributes> =
pub struct BeaconConsensusEngine<DB, BT, Client, EngineT>
where
DB: Database,
Client: HeadersClient + BodiesClient,
Client: BlockClient,
BT: BlockchainTreeEngine
+ BlockReader
+ BlockIdReader

View File

@ -11,6 +11,7 @@ use reth_network_p2p::{
bodies::client::BodiesClient,
full_block::{FetchFullBlockFuture, FetchFullBlockRangeFuture, FullBlockClient},
headers::client::HeadersClient,
BlockClient,
};
use reth_primitives::{BlockNumber, SealedBlock, B256};
use reth_stages_api::{ControlFlow, Pipeline, PipelineError, PipelineTarget, PipelineWithResult};
@ -35,7 +36,7 @@ use tracing::trace;
pub(crate) struct EngineSyncController<DB, Client>
where
DB: Database,
Client: HeadersClient + BodiesClient,
Client: BlockClient,
{
/// A downloader that can download full blocks from the network.
full_block_client: FullBlockClient<Client>,