mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: propagate network primitives generic to EthStream usages (#13117)
This commit is contained in:
@ -839,7 +839,7 @@ mod tests {
|
|||||||
f: F,
|
f: F,
|
||||||
) -> Pin<Box<dyn Future<Output = ()> + Send>>
|
) -> Pin<Box<dyn Future<Output = ()> + Send>>
|
||||||
where
|
where
|
||||||
F: FnOnce(EthStream<P2PStream<ECIESStream<TcpStream>>>) -> O + Send + 'static,
|
F: FnOnce(EthStream<P2PStream<ECIESStream<TcpStream>>, N>) -> O + Send + 'static,
|
||||||
O: Future<Output = ()> + Send + Sync,
|
O: Future<Output = ()> + Send + Sync,
|
||||||
{
|
{
|
||||||
let status = self.status;
|
let status = self.status;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use reth_ecies::stream::ECIESStream;
|
|||||||
use reth_eth_wire::{
|
use reth_eth_wire::{
|
||||||
EthMessage, EthStream, HelloMessage, P2PStream, Status, UnauthedEthStream, UnauthedP2PStream,
|
EthMessage, EthStream, HelloMessage, P2PStream, Status, UnauthedEthStream, UnauthedP2PStream,
|
||||||
};
|
};
|
||||||
use reth_network::config::rng_secret_key;
|
use reth_network::{config::rng_secret_key, EthNetworkPrimitives};
|
||||||
use reth_network_peers::{mainnet_nodes, pk2id, NodeRecord};
|
use reth_network_peers::{mainnet_nodes, pk2id, NodeRecord};
|
||||||
use reth_primitives::{EthereumHardfork, Head};
|
use reth_primitives::{EthereumHardfork, Head};
|
||||||
use secp256k1::{SecretKey, SECP256K1};
|
use secp256k1::{SecretKey, SECP256K1};
|
||||||
@ -24,7 +24,7 @@ use std::sync::LazyLock;
|
|||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
|
|
||||||
type AuthedP2PStream = P2PStream<ECIESStream<TcpStream>>;
|
type AuthedP2PStream = P2PStream<ECIESStream<TcpStream>>;
|
||||||
type AuthedEthStream = EthStream<P2PStream<ECIESStream<TcpStream>>>;
|
type AuthedEthStream = EthStream<P2PStream<ECIESStream<TcpStream>>, EthNetworkPrimitives>;
|
||||||
|
|
||||||
pub static MAINNET_BOOT_NODES: LazyLock<Vec<NodeRecord>> = LazyLock::new(mainnet_nodes);
|
pub static MAINNET_BOOT_NODES: LazyLock<Vec<NodeRecord>> = LazyLock::new(mainnet_nodes);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user