mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
remove unused fields
This commit is contained in:
@ -4,9 +4,6 @@ from .raw_connection_interface import IRawConnection
|
||||
|
||||
|
||||
class RawConnection(IRawConnection):
|
||||
|
||||
conn_ip: str
|
||||
conn_port: str
|
||||
reader: asyncio.StreamReader
|
||||
writer: asyncio.StreamWriter
|
||||
initiator: bool
|
||||
@ -16,14 +13,10 @@ class RawConnection(IRawConnection):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
ip: str,
|
||||
port: str,
|
||||
reader: asyncio.StreamReader,
|
||||
writer: asyncio.StreamWriter,
|
||||
initiator: bool,
|
||||
) -> None:
|
||||
self.conn_ip = ip
|
||||
self.conn_port = port
|
||||
self.reader = reader
|
||||
self.writer = writer
|
||||
self.initiator = initiator
|
||||
|
||||
@ -204,13 +204,7 @@ class Swarm(INetwork):
|
||||
) -> None:
|
||||
# Upgrade reader/write to a net_stream and pass \
|
||||
# to appropriate stream handler (using multiaddr)
|
||||
raw_conn = RawConnection(
|
||||
maddr.value_for_protocol("ip4"),
|
||||
maddr.value_for_protocol("tcp"),
|
||||
reader,
|
||||
writer,
|
||||
False,
|
||||
)
|
||||
raw_conn = RawConnection(reader, writer, False)
|
||||
|
||||
# Per, https://discuss.libp2p.io/t/multistream-security/130, we first secure
|
||||
# the conn and then mux the conn
|
||||
|
||||
Reference in New Issue
Block a user