`handles` should be called on concrete transport
This commit is contained in:
parent
3df92e0d67
commit
79129ea6d1
|
@ -63,4 +63,4 @@ method dial*(t: TcpTransport,
|
||||||
let client: StreamTransport = await connect(address)
|
let client: StreamTransport = await connect(address)
|
||||||
result = await t.connHandler(t.server, client)
|
result = await t.connHandler(t.server, client)
|
||||||
|
|
||||||
method handles*(t: Transport, address: MultiAddress): bool {.gcsafe.} = true
|
method handles*(t: TcpTransport, address: MultiAddress): bool {.gcsafe.} = true
|
||||||
|
|
|
@ -3,7 +3,7 @@ import chronos
|
||||||
import ../libp2p/connection, ../libp2p/transport, ../libp2p/tcptransport,
|
import ../libp2p/connection, ../libp2p/transport, ../libp2p/tcptransport,
|
||||||
../libp2p/multiaddress, ../libp2p/wire
|
../libp2p/multiaddress, ../libp2p/wire
|
||||||
|
|
||||||
suite "TCP transport suite":
|
suite "TCP transport":
|
||||||
test "test listener: handle write":
|
test "test listener: handle write":
|
||||||
proc testListener(): Future[bool] {.async, gcsafe.} =
|
proc testListener(): Future[bool] {.async, gcsafe.} =
|
||||||
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53335")
|
let ma: MultiAddress = Multiaddress.init("/ip4/127.0.0.1/tcp/53335")
|
||||||
|
|
Loading…
Reference in New Issue