Skip to content

Commit

Permalink
chore(reth-engine-tree): Replace HeadersClient + BodiesClient with Bl…
Browse files Browse the repository at this point in the history
…ockClient (paradigmxyz#10073)
  • Loading branch information
nkysg authored and martinezjorge committed Aug 7, 2024
1 parent b8a878b commit 0a1019a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/engine/tree/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ use crate::{engine::DownloadRequest, metrics::BlockDownloaderMetrics};
use futures::FutureExt;
use reth_consensus::Consensus;
use reth_network_p2p::{
bodies::client::BodiesClient,
full_block::{FetchFullBlockFuture, FetchFullBlockRangeFuture, FullBlockClient},
headers::client::HeadersClient,
BlockClient,
};
use reth_primitives::{SealedBlock, SealedBlockWithSenders, B256};
use std::{
Expand Down Expand Up @@ -47,7 +46,7 @@ pub enum DownloadOutcome {
/// Basic [`BlockDownloader`].
pub struct BasicBlockDownloader<Client>
where
Client: HeadersClient + BodiesClient + Clone + Unpin + 'static,
Client: BlockClient + 'static,
{
/// A downloader that can download full blocks from the network.
full_block_client: FullBlockClient<Client>,
Expand All @@ -66,7 +65,7 @@ where

impl<Client> BasicBlockDownloader<Client>
where
Client: HeadersClient + BodiesClient + Clone + Unpin + 'static,
Client: BlockClient + 'static,
{
/// Create a new instance
pub fn new(client: Client, consensus: Arc<dyn Consensus>) -> Self {
Expand Down Expand Up @@ -175,7 +174,7 @@ where

impl<Client> BlockDownloader for BasicBlockDownloader<Client>
where
Client: HeadersClient + BodiesClient + Clone + Unpin + 'static,
Client: BlockClient + 'static,
{
/// Handles incoming download actions.
fn on_action(&mut self, action: DownloadAction) {
Expand Down

0 comments on commit 0a1019a

Please sign in to comment.