review cleanup
This commit is contained in:
parent
5ae37cac98
commit
06b759e049
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue