refactor: extract peer types to net/types (#7912)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Andrzej Sulkowski
2024-04-27 06:18:59 +02:00
committed by GitHub
parent 6bdba8a2a6
commit cc4a418ddf
75 changed files with 428 additions and 86 deletions

View File

@ -15,6 +15,7 @@ workspace = true
# reth
reth-primitives.workspace = true
reth-metrics.workspace = true
reth-network-types.workspace = true
# ethereum
alloy-rlp.workspace = true

View File

@ -3,7 +3,7 @@
use discv5::enr::{CombinedPublicKey, EnrPublicKey, NodeId};
use enr::Enr;
use reth_primitives::{id2pk, pk2id, PeerId};
use reth_network_types::{id2pk, pk2id, PeerId};
use secp256k1::{PublicKey, SecretKey};
/// Extracts a [`CombinedPublicKey::Secp256k1`] from a [`discv5::Enr`] and converts it to a

View File

@ -22,7 +22,8 @@ use enr::{discv4_id_to_discv5_id, EnrCombinedKeyWrapper};
use futures::future::join_all;
use itertools::Itertools;
use rand::{Rng, RngCore};
use reth_primitives::{bytes::Bytes, EnrForkIdEntry, ForkId, NodeRecord, PeerId};
use reth_network_types::PeerId;
use reth_primitives::{bytes::Bytes, EnrForkIdEntry, ForkId, NodeRecord};
use secp256k1::SecretKey;
use tokio::{sync::mpsc, task};
use tracing::{debug, error, trace};