primitives: rm more alloy_primitives reexports (#11325)

This commit is contained in:
Thomas Coratger
2024-09-30 03:06:47 +02:00
committed by GitHub
parent ea1d04aa75
commit e21d75f9aa
53 changed files with 114 additions and 136 deletions

View File

@ -1,7 +1,7 @@
use std::{collections::HashMap, io, path::Path};
use alloy_eips::BlockHashOrNumber;
use alloy_primitives::{BlockHash, BlockNumber, B256};
use alloy_primitives::{BlockHash, BlockNumber, Sealable, B256};
use futures::Future;
use itertools::Either;
use reth_network_p2p::{
@ -12,7 +12,7 @@ use reth_network_p2p::{
priority::Priority,
};
use reth_network_peers::PeerId;
use reth_primitives::{alloy_primitives::Sealable, BlockBody, Header, SealedHeader};
use reth_primitives::{BlockBody, Header, SealedHeader};
use thiserror::Error;
use tokio::{fs::File, io::AsyncReadExt};
use tokio_stream::StreamExt;

View File

@ -3,7 +3,7 @@
use super::task::TaskDownloader;
use crate::metrics::HeaderDownloaderMetrics;
use alloy_eips::BlockHashOrNumber;
use alloy_primitives::{BlockNumber, B256};
use alloy_primitives::{BlockNumber, Sealable, B256};
use futures::{stream::Stream, FutureExt};
use futures_util::{stream::FuturesUnordered, StreamExt};
use rayon::prelude::*;
@ -19,7 +19,7 @@ use reth_network_p2p::{
priority::Priority,
};
use reth_network_peers::PeerId;
use reth_primitives::{alloy_primitives::Sealable, GotExpected, Header, SealedHeader};
use reth_primitives::{GotExpected, Header, SealedHeader};
use reth_tasks::{TaskSpawner, TokioTaskExecutor};
use std::{
cmp::{Ordering, Reverse},

View File

@ -2,7 +2,8 @@
#![allow(dead_code)]
use reth_primitives::{alloy_primitives::Sealable, SealedHeader};
use alloy_primitives::Sealable;
use reth_primitives::SealedHeader;
/// Returns a new [`SealedHeader`] that's the child header of the given `parent`.
pub(crate) fn child_header(parent: &SealedHeader) -> SealedHeader {

View File

@ -213,9 +213,12 @@ pub struct ReceiptWithBlockNumber {
#[cfg(test)]
mod test {
use alloy_primitives::{bytes::BytesMut, hex, Address, Bytes, Log, LogData, B256};
use alloy_primitives::{
bytes::{Buf, BytesMut},
hex, Address, Bytes, Log, LogData, B256,
};
use alloy_rlp::{Decodable, RlpDecodable};
use reth_primitives::{Buf, Receipt, TxType};
use reth_primitives::{Receipt, TxType};
use reth_tracing::init_test_tracing;
use tokio_util::codec::Decoder;