misc: nimpretty

This commit is contained in:
Dmitriy Ryajov 2019-09-23 16:35:23 -06:00
parent 3c2009c85e
commit 663ce6c589
2 changed files with 8 additions and 6 deletions

View File

@ -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:

View File

@ -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