mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-03-01 08:30:29 +00:00
remove secureCodec
there may be multiple connections per peerinfo with different codecs
This commit is contained in:
parent
b58640fbfc
commit
8cd71eebd1
@ -29,7 +29,6 @@ type
|
||||
PeerInfo* = ref object of RootObj
|
||||
peerId*: PeerID
|
||||
addrs*: seq[MultiAddress]
|
||||
secureCodec*: string
|
||||
protocols*: seq[string]
|
||||
lifefut: Future[void]
|
||||
protoVersion*: string
|
||||
@ -50,7 +49,6 @@ proc `$`*(p: PeerInfo): string = p.id
|
||||
proc shortLog*(p: PeerInfo): auto =
|
||||
(
|
||||
id: p.id(),
|
||||
secureCodec: p.secureCodec,
|
||||
addrs: mapIt(p.addrs, $it),
|
||||
protocols: mapIt(p.protocols, $it),
|
||||
protoVersion: p.protoVersion,
|
||||
|
@ -488,8 +488,6 @@ method handshake*(p: Noise, conn: Connection, initiator: bool): Future[SecureCon
|
||||
if conn.peerInfo != nil: conn.peerInfo
|
||||
else: PeerInfo.init(remotePubKey)
|
||||
|
||||
peerInfo.secureCodec = NoiseCodec
|
||||
|
||||
var tmp = NoiseConnection.init(conn, peerInfo, conn.observedAddr)
|
||||
|
||||
if initiator:
|
||||
|
@ -251,8 +251,6 @@ proc newSecioConn(conn: Connection,
|
||||
if conn.peerInfo != nil: conn.peerInfo
|
||||
else: PeerInfo.init(remotePubKey)
|
||||
|
||||
peerInfo.secureCodec = SecioCodec & "(" & cipher & ")"
|
||||
|
||||
result = SecioConn.init(conn, peerInfo, conn.observedAddr)
|
||||
|
||||
let i0 = if order < 0: 1 else: 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user