mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
code review findings
This commit is contained in:
@ -29,7 +29,6 @@ use tokio::sync::Mutex;
|
||||
use tracing::{debug, info};
|
||||
|
||||
use crate::serialized::{BlockAndReceipts, EvmBlock};
|
||||
use crate::share_blocks::ShareBlocks;
|
||||
use crate::spot_meta::erc20_contract_to_spot_token;
|
||||
|
||||
/// Poll interval when tailing an *open* hourly file.
|
||||
@ -42,7 +41,6 @@ pub(crate) struct BlockIngest {
|
||||
pub local_ingest_dir: Option<PathBuf>,
|
||||
pub local_blocks_cache: Arc<Mutex<BTreeMap<u64, BlockAndReceipts>>>, // height → block
|
||||
pub precompiles_cache: PrecompilesCache,
|
||||
pub hlfs: Option<ShareBlocks>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@ -159,16 +157,6 @@ impl BlockIngest {
|
||||
return Some(block);
|
||||
}
|
||||
|
||||
// if let Some(hlfs) = &self.hlfs {
|
||||
// //info!("!! HEIGHT [{height}] :: HEAD [{head}]");
|
||||
// if hlfs.try_fetch_one(height).await.ok().flatten().is_some() {
|
||||
// if let Some(block) = self.try_collect_local_block(height).await {
|
||||
// info!("Returning HLFS-fetched block @[{height}]");
|
||||
// return Some(block);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
self.try_collect_s3_block(height)
|
||||
}
|
||||
|
||||
|
||||
@ -60,10 +60,6 @@ impl ShareBlocks {
|
||||
Ok(Self { _server, _autodetect })
|
||||
}
|
||||
|
||||
// #[allow(dead_code)]
|
||||
// pub(crate) async fn try_fetch_one(&self, block: u64) -> eyre::Result<Option<usize>> {
|
||||
// self._backfiller.fetch_if_missing(block).await.map_err(|e| eyre::eyre!(e))
|
||||
// }
|
||||
}
|
||||
|
||||
fn spawn_autodetect<Net>(
|
||||
|
||||
Reference in New Issue
Block a user