mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: rm HasRemoteAddr trait (#8809)
This commit is contained in:
@ -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"] }
|
||||
|
||||
@ -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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user