Skip to content

Commit

Permalink
fix: rebase with ping extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ogenev committed Jan 29, 2025
1 parent 789dd07 commit bc0d4e9
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions crates/subnetworks/history/src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ use ssz_types::BitList;
use tracing::{error, info, warn};
use trin_metrics::downloader::DownloaderMetricsReporter;

use crate::{storage::HistoryStorage, validation::ChainHistoryValidator};
use crate::{
ping_extensions::HistoryPingExtensions, storage::HistoryStorage,
validation::ChainHistoryValidator,
};

/// The number of blocks to download in a single batch.
const BATCH_SIZE: usize = 30;
Expand Down Expand Up @@ -62,15 +65,28 @@ impl Display for ContentType {
#[derive(Clone)]
pub struct Downloader {
pub census: Option<Census>,
pub overlay_arc:
Arc<OverlayProtocol<HistoryContentKey, XorMetric, ChainHistoryValidator, HistoryStorage>>,
pub overlay_arc: Arc<
OverlayProtocol<
HistoryContentKey,
XorMetric,
ChainHistoryValidator,
HistoryStorage,
HistoryPingExtensions,
>,
>,
pub metrics: DownloaderMetricsReporter,
}

impl Downloader {
pub fn new(
overlay_arc: Arc<
OverlayProtocol<HistoryContentKey, XorMetric, ChainHistoryValidator, HistoryStorage>,
OverlayProtocol<
HistoryContentKey,
XorMetric,
ChainHistoryValidator,
HistoryStorage,
HistoryPingExtensions,
>,
>,
) -> Self {
// Build hhtp client bound to the current node web3rpc
Expand Down

0 comments on commit bc0d4e9

Please sign in to comment.