mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 23:38:10 -05:00
chore(deps): clean up unused imports and dependencies in reth-downloaders (#19875)
This commit is contained in:
@@ -67,6 +67,8 @@ assert_matches.workspace = true
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
||||
rand.workspace = true
|
||||
tempfile.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
itertools.workspace = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
#[cfg(any(test, feature = "test-utils"))]
|
||||
use tempfile as _;
|
||||
|
||||
/// The collection of algorithms for downloading block bodies.
|
||||
pub mod bodies;
|
||||
|
||||
|
||||
@@ -5,12 +5,9 @@
|
||||
#[cfg(any(test, feature = "file-client"))]
|
||||
use crate::{bodies::test_utils::create_raw_bodies, file_codec::BlockFileCodec};
|
||||
use alloy_primitives::B256;
|
||||
use futures::SinkExt;
|
||||
use reth_ethereum_primitives::BlockBody;
|
||||
use reth_testing_utils::generators::{self, random_block_range, BlockRangeParams};
|
||||
use std::{collections::HashMap, io::SeekFrom, ops::RangeInclusive};
|
||||
use tokio::{fs::File, io::AsyncSeekExt};
|
||||
use tokio_util::codec::FramedWrite;
|
||||
use std::{collections::HashMap, ops::RangeInclusive};
|
||||
|
||||
mod bodies_client;
|
||||
pub use bodies_client::TestBodiesClient;
|
||||
@@ -42,6 +39,11 @@ pub(crate) fn generate_bodies(
|
||||
pub(crate) async fn generate_bodies_file(
|
||||
range: RangeInclusive<u64>,
|
||||
) -> (tokio::fs::File, Vec<SealedHeader>, HashMap<B256, BlockBody>) {
|
||||
use futures::SinkExt;
|
||||
use std::io::SeekFrom;
|
||||
use tokio::{fs::File, io::AsyncSeekExt};
|
||||
use tokio_util::codec::FramedWrite;
|
||||
|
||||
let (headers, bodies) = generate_bodies(range);
|
||||
let raw_block_bodies = create_raw_bodies(headers.iter().cloned(), &mut bodies.clone());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user