review cleanup

This commit is contained in:
Dmitriy Ryajov 2019-09-25 13:24:09 -06:00
parent 5ae37cac98
commit 06b759e049
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ proc readAndPrint(p: ChatProto) {.async, gcsafe.} =
proc dialPeer(p: ChatProto, address: string) {.async, gcsafe.} =
var parts = address.split("/")
if parts.len == 11 and parts[^2] != "ipfs" and parts[^2] != "p2p":
if parts.len == 11 and parts[^2] notin ["ipfs", "p2p"]:
quit("invalid or incompelete peerId")
var remotePeer: PeerInfo

View File

@ -142,7 +142,7 @@ proc getLocalAddress*(sock: AsyncFD): TransportAddress =
fromSAddr(addr saddr, slen, result)
proc toMultiAddr*(address: TransportAddress): MultiAddress =
## Returns string representation of ``address``.
## Returns a multiaddr of ``address``.
case address.family
of AddressFamily.IPv4:
var a = IpAddress(