chore: rm HasRemoteAddr trait (#8809)

This commit is contained in:
Matthias Seitz
2024-06-13 22:46:30 +02:00
committed by GitHub
parent 8bb1270d54
commit be12177a2f
7 changed files with 4 additions and 25 deletions

View File

@ -12,7 +12,6 @@ workspace = true
[dependencies]
reth-primitives.workspace = true
reth-net-common.workspace = true
reth-network-peers = { workspace = true, features = ["secp256k1"] }
alloy-rlp = { workspace = true, features = ["derive"] }

View File

@ -4,7 +4,6 @@ use crate::{
codec::ECIESCodec, error::ECIESErrorImpl, ECIESError, EgressECIESValue, IngressECIESValue,
};
use futures::{ready, Sink, SinkExt};
use reth_net_common::stream::HasRemoteAddr;
use reth_primitives::{
bytes::{Bytes, BytesMut},
B512 as PeerId,
@ -38,10 +37,10 @@ pub struct ECIESStream<Io> {
impl<Io> ECIESStream<Io>
where
Io: AsyncRead + AsyncWrite + Unpin + HasRemoteAddr,
Io: AsyncRead + AsyncWrite + Unpin,
{
/// Connect to an `ECIES` server
#[instrument(skip(transport, secret_key), fields(peer=&*format!("{:?}", transport.remote_addr())))]
#[instrument(skip(transport, secret_key))]
pub async fn connect(
transport: Io,
secret_key: SecretKey,
@ -98,7 +97,6 @@ where
}
/// Listen on a just connected ECIES client
#[instrument(skip_all, fields(peer=&*format!("{:?}", transport.remote_addr())))]
pub async fn incoming(transport: Io, secret_key: SecretKey) -> Result<Self, ECIESError> {
let ecies = ECIESCodec::new_server(secret_key)?;