net: replace reth-primitive imports with alloy-eips (#11027)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Håvard Anda Estensen
2024-09-20 08:23:38 +02:00
committed by GitHub
parent 4ae286e69f
commit 08bdec9efa
15 changed files with 27 additions and 13 deletions

View File

@ -27,6 +27,7 @@ reth-db-api = { workspace = true, optional = true }
reth-testing-utils = { workspace = true, optional = true }
# ethereum
alloy-eips.workspace = true
alloy-primitives.workspace = true
alloy-rlp.workspace = true

View File

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

View File

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