chore: propagate network primitives generic to EthStream usages (#13117)

This commit is contained in:
Dan Cline
2024-12-03 17:06:42 -05:00
committed by GitHub
parent bdfbcab531
commit c6add45c0d
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);