mirror of
https://github.com/logos-storage/nim-libp2p.git
synced 2026-05-22 17:39:32 +00:00
fix: use custom constructor
This commit is contained in:
parent
917e0553e1
commit
b4dced6186
@ -18,7 +18,7 @@ suite "Identify":
|
|||||||
peerInfo.peerId = PeerID.init(remoteSeckey)
|
peerInfo.peerId = PeerID.init(remoteSeckey)
|
||||||
peerInfo.addrs.add(ma)
|
peerInfo.addrs.add(ma)
|
||||||
|
|
||||||
let identifyProto = newProtocol(Identify, peerInfo)
|
let identifyProto = newIdentify(peerInfo)
|
||||||
let msListen = newMultistream()
|
let msListen = newMultistream()
|
||||||
|
|
||||||
msListen.addHandler(IdentifyCodec, identifyProto)
|
msListen.addHandler(IdentifyCodec, identifyProto)
|
||||||
@ -38,7 +38,7 @@ suite "Identify":
|
|||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
peerInfo.addrs.add(ma)
|
peerInfo.addrs.add(ma)
|
||||||
|
|
||||||
let identifyProto = newProtocol(Identify, peerInfo)
|
let identifyProto = newIdentify(peerInfo)
|
||||||
let res = await msDial.select(conn, IdentifyCodec)
|
let res = await msDial.select(conn, IdentifyCodec)
|
||||||
|
|
||||||
let id = await identifyProto.identify(conn)
|
let id = await identifyProto.identify(conn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user