Skip to content

Commit

Permalink
style: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Dec 17, 2024
1 parent a7723ee commit 680854c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions bin/host/src/extended_fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use tracing::{error, info, trace, warn};
/// to fetch preimages from EigenDA.
/// TODO: Kona is planning to change the fetcher interface to allow registering extra hints
/// without needing a new type. We will probably want to switch when possible.
/// See https://github.com/anton-rs/kona/issues/369
/// See <https://github.com/anton-rs/kona/issues/369>
#[derive(Debug)]
pub struct FetcherWithEigenDASupport<KV>
where
Expand Down Expand Up @@ -93,7 +93,7 @@ where

/// Fetch the preimage for the given key. The requested is routed to the appropriate fetcher
/// based on the last hint that was received (see hint() above).
/// ExtendedFetcher -> get_preimage_altda -> prefetch that only understands altda hints
/// FetcherWithEigenDASupport -> get_preimage_altda -> prefetch that only understands altda hints
/// \-> Fetcher -> get_preimage -> prefetch that understands all other hints
pub async fn get_preimage(&self, key: B256) -> Result<Vec<u8>> {
match self.last_eigenda_hint.as_ref() {
Expand Down
18 changes: 10 additions & 8 deletions bin/host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ pub async fn start_server_and_native_client(cfg: HostCli) -> Result<i32> {
.await
.map_err(|e| anyhow!("Failed to load eigenda blob provider configuration: {e}"))?;

Some(Arc::new(RwLock::new(FetcherWithEigenDASupport::new_from_parts(
kv_store.clone(),
l1_provider,
blob_provider,
eigenda_blob_provider,
l2_provider,
cfg.agreed_l2_head_hash,
))))
Some(Arc::new(RwLock::new(
FetcherWithEigenDASupport::new_from_parts(
kv_store.clone(),
l1_provider,
blob_provider,
eigenda_blob_provider,
l2_provider,
cfg.agreed_l2_head_hash,
),
)))
} else {
None
};
Expand Down
8 changes: 4 additions & 4 deletions bin/host/src/preimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use kona_preimage::{
use std::sync::Arc;
use tokio::sync::RwLock;

/// A [ExtendedFetcher]-backed implementation of the [PreimageFetcher] trait.
/// A [FetcherWithEigenDASupport]-backed implementation of the [PreimageFetcher] trait.
#[derive(Debug)]
pub struct OnlinePreimageFetcher<KV>
where
Expand All @@ -36,7 +36,7 @@ impl<KV> OnlinePreimageFetcher<KV>
where
KV: KeyValueStore + ?Sized,
{
/// Create a new [OnlinePreimageFetcher] from the given [ExtendedFetcher].
/// Create a new [OnlinePreimageFetcher] from the given [FetcherWithEigenDASupport].
pub const fn new(fetcher: Arc<RwLock<FetcherWithEigenDASupport<KV>>>) -> Self {
Self { inner: fetcher }
}
Expand Down Expand Up @@ -74,7 +74,7 @@ where
}
}

/// A [ExtendedFetcher]-backed implementation of the [HintRouter] trait.
/// A [FetcherWithEigenDASupport]-backed implementation of the [HintRouter] trait.
#[derive(Debug)]
pub struct OnlineHintRouter<KV>
where
Expand All @@ -101,7 +101,7 @@ impl<KV> OnlineHintRouter<KV>
where
KV: KeyValueStore + ?Sized,
{
/// Create a new [OnlineHintRouter] from the given [ExtendedFetcher].
/// Create a new [OnlineHintRouter] from the given [FetcherWithEigenDASupport].
pub const fn new(fetcher: Arc<RwLock<FetcherWithEigenDASupport<KV>>>) -> Self {
Self { inner: fetcher }
}
Expand Down

0 comments on commit 680854c

Please sign in to comment.