diff --git a/libp2p/protocols/pubsub/rpcmsg.nim b/libp2p/protocols/pubsub/rpcmsg.nim index 3ae50ba..4109b61 100644 --- a/libp2p/protocols/pubsub/rpcmsg.nim +++ b/libp2p/protocols/pubsub/rpcmsg.nim @@ -57,7 +57,7 @@ proc encodeSubs(subs: SubOpts, buff: var ProtoBuffer) {.gcsafe.} = buff.write(initProtoField(2, subs.topic)) proc encodeRpcMsg*(msg: RPCMsg): ProtoBuffer {.gcsafe.} = - result = initProtoBuffer({WithVarintLength}) + result = initProtoBuffer({WithVarintLength}) trace "encoding msg: ", msg = msg if msg.subscriptions.len > 0: diff --git a/libp2p/transports/transport.nim b/libp2p/transports/transport.nim index ff89458..be88d9b 100644 --- a/libp2p/transports/transport.nim +++ b/libp2p/transports/transport.nim @@ -9,8 +9,10 @@ import sequtils import chronos -import ../peerinfo, ../connection, - ../multiaddress, ../multicodec +import ../peerinfo, + ../connection, + ../multiaddress, + ../multicodec type ConnHandler* = proc (conn: Connection): Future[void] {.gcsafe.} @@ -40,19 +42,19 @@ method close*(t: Transport) {.base, async, gcsafe.} = method listen*(t: Transport, ma: MultiAddress, - handler: ConnHandler): + handler: ConnHandler): Future[Future[void]] {.base, async, gcsafe.} = ## listen for incoming connections t.ma = ma t.handler = handler method dial*(t: Transport, - address: MultiAddress): + address: MultiAddress): Future[Connection] {.base, async, gcsafe.} = ## dial a peer discard -method upgrade*(t: Transport) {.base, async, gcsafe.} = +method upgrade*(t: Transport) {.base, async, gcsafe.} = ## base upgrade method that the transport uses to perform ## transport specific upgrades discard