mirror of https://github.com/vacp2p/nim-libp2p.git
Fix chat example to show peers in base58.
This commit is contained in:
parent
b4e9a7b8a6
commit
ff965830d8
|
@ -101,7 +101,7 @@ proc main() {.async.} =
|
||||||
var id = await data.api.identity()
|
var id = await data.api.identity()
|
||||||
|
|
||||||
proc streamHandler(api: DaemonAPI, stream: P2PStream) {.async.} =
|
proc streamHandler(api: DaemonAPI, stream: P2PStream) {.async.} =
|
||||||
echo "= Peer ", toHex(stream.peer), " joined chat"
|
echo "= Peer ", Base58.encode(stream.peer), " joined chat"
|
||||||
data.remotes.add(stream.transp)
|
data.remotes.add(stream.transp)
|
||||||
while true:
|
while true:
|
||||||
var line = await stream.transp.readLine()
|
var line = await stream.transp.readLine()
|
||||||
|
|
Loading…
Reference in New Issue