refactor(net): move node record constants to network-peers crate (#9161)

This commit is contained in:
Thomas Coratger
2024-06-28 09:45:23 +02:00
committed by GitHub
parent d8e6d01308
commit 530e7e8961
23 changed files with 151 additions and 290 deletions

View File

@ -12,6 +12,7 @@ reth-chainspec.workspace = true
reth-discv4 = { workspace = true, features = ["test-utils"] }
reth-network = { workspace = true, features = ["test-utils"] }
reth-network-api.workspace = true
reth-network-peers.workspace = true
reth-primitives.workspace = true
reth-tracing.workspace = true

View File

@ -1,7 +1,7 @@
use reth_chainspec::{
net::NodeRecord, BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork,
ForkCondition,
BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition,
};
use reth_network_peers::NodeRecord;
use reth_primitives::{b256, B256};
use std::sync::Arc;

View File

@ -2,8 +2,8 @@
use discv5::{enr::secp256k1::rand, Enr, Event, ListenConfig};
use reth::network::config::SecretKey;
use reth_chainspec::net::NodeRecord;
use reth_discv5::{enr::EnrCombinedKeyWrapper, Config, Discv5};
use reth_network_peers::NodeRecord;
use reth_tracing::tracing::info;
use std::{
future::Future,

View File

@ -10,14 +10,14 @@ use std::time::Duration;
use futures::StreamExt;
use once_cell::sync::Lazy;
use reth_chainspec::{net::mainnet_nodes, Chain, MAINNET};
use reth_chainspec::{Chain, MAINNET};
use reth_discv4::{DiscoveryUpdate, Discv4, Discv4ConfigBuilder, DEFAULT_DISCOVERY_ADDRESS};
use reth_ecies::stream::ECIESStream;
use reth_eth_wire::{
EthMessage, EthStream, HelloMessage, P2PStream, Status, UnauthedEthStream, UnauthedP2PStream,
};
use reth_network::config::rng_secret_key;
use reth_network_peers::{pk2id, NodeRecord};
use reth_network_peers::{mainnet_nodes, pk2id, NodeRecord};
use reth_primitives::{EthereumHardfork, Head, MAINNET_GENESIS_HASH};
use secp256k1::{SecretKey, SECP256K1};
use tokio::net::TcpStream;