mirror of https://github.com/vacp2p/nim-libp2p.git
test: rework remove generic protocol constructor
This commit is contained in:
parent
0c0184ca63
commit
f4a9b9cba9
|
@ -156,7 +156,7 @@ suite "Multistream select":
|
||||||
let seckey = PrivateKey.random(RSA)
|
let seckey = PrivateKey.random(RSA)
|
||||||
var peerInfo: PeerInfo
|
var peerInfo: PeerInfo
|
||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
var protocol: LPProtocol = newProtocol(LPProtocol, peerInfo)
|
var protocol: LPProtocol = new LPProtocol
|
||||||
proc testHandler(conn: Connection,
|
proc testHandler(conn: Connection,
|
||||||
proto: string):
|
proto: string):
|
||||||
Future[void] {.async, gcsafe.} =
|
Future[void] {.async, gcsafe.} =
|
||||||
|
@ -185,7 +185,7 @@ suite "Multistream select":
|
||||||
let seckey = PrivateKey.random(RSA)
|
let seckey = PrivateKey.random(RSA)
|
||||||
var peerInfo: PeerInfo
|
var peerInfo: PeerInfo
|
||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
var protocol: LPProtocol = newProtocol(LPProtocol, peerInfo)
|
var protocol: LPProtocol = new LPProtocol
|
||||||
proc testHandler(conn: Connection,
|
proc testHandler(conn: Connection,
|
||||||
proto: string):
|
proto: string):
|
||||||
Future[void] {.async, gcsafe.} = discard
|
Future[void] {.async, gcsafe.} = discard
|
||||||
|
@ -213,7 +213,7 @@ suite "Multistream select":
|
||||||
let seckey = PrivateKey.random(RSA)
|
let seckey = PrivateKey.random(RSA)
|
||||||
var peerInfo: PeerInfo
|
var peerInfo: PeerInfo
|
||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
var protocol: LPProtocol = newProtocol(LPProtocol, peerInfo)
|
var protocol: LPProtocol = new LPProtocol
|
||||||
proc testHandler(conn: Connection,
|
proc testHandler(conn: Connection,
|
||||||
proto: string):
|
proto: string):
|
||||||
Future[void] {.async, gcsafe.} = discard
|
Future[void] {.async, gcsafe.} = discard
|
||||||
|
@ -233,7 +233,7 @@ suite "Multistream select":
|
||||||
let seckey = PrivateKey.random(RSA)
|
let seckey = PrivateKey.random(RSA)
|
||||||
var peerInfo: PeerInfo
|
var peerInfo: PeerInfo
|
||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
var protocol: LPProtocol = newProtocol(LPProtocol, peerInfo)
|
var protocol: LPProtocol = new LPProtocol
|
||||||
proc testHandler(conn: Connection,
|
proc testHandler(conn: Connection,
|
||||||
proto: string):
|
proto: string):
|
||||||
Future[void] {.async, gcsafe.} =
|
Future[void] {.async, gcsafe.} =
|
||||||
|
@ -273,7 +273,7 @@ suite "Multistream select":
|
||||||
let seckey = PrivateKey.random(RSA)
|
let seckey = PrivateKey.random(RSA)
|
||||||
var peerInfo: PeerInfo
|
var peerInfo: PeerInfo
|
||||||
peerInfo.peerId = PeerID.init(seckey)
|
peerInfo.peerId = PeerID.init(seckey)
|
||||||
var protocol: LPProtocol = newProtocol(LPProtocol, peerInfo)
|
var protocol: LPProtocol = new LPProtocol
|
||||||
proc testHandler(conn: Connection,
|
proc testHandler(conn: Connection,
|
||||||
proto: string):
|
proto: string):
|
||||||
Future[void] {.async.} = discard
|
Future[void] {.async.} = discard
|
||||||
|
|
Loading…
Reference in New Issue