Skip to content

Commit 1f18ee7

Browse files
committed
address review comments
1 parent 4cc73a2 commit 1f18ee7

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

apps/chat2mix/chat2mix.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ proc encode*(message: Chat2Message): ProtoBuffer =
124124

125125
return serialised
126126

127-
proc toString*(message: Chat2Message): string =
127+
proc `$`*(message: Chat2Message): string =
128128
# Get message date and timestamp in local time
129129
let time = message.timestamp.fromUnix().local().format("'<'MMM' 'dd,' 'HH:mm'>'")
130130

@@ -150,7 +150,7 @@ proc getChatLine(payload: seq[byte]): string =
150150
# No payload encoding/encryption from Waku
151151
let pb = Chat2Message.init(payload).valueOr:
152152
return string.fromBytes(payload)
153-
return pb.toString()
153+
return $pb
154154

155155
proc printReceivedMessage(c: Chat, msg: WakuMessage) =
156156
let chatLine = getChatLine(msg.payload)

waku/node/waku_node.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import
2222
libp2p/transports/tcptransport,
2323
libp2p/transports/wstransport,
2424
libp2p/utility,
25+
libp2p/utils/offsettedseq,
2526
libp2p/protocols/mix,
2627
libp2p/protocols/mix/mix_protocol
2728

waku/waku_mix/protocol.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ proc new*(
182182
peermgr.switch.peerInfo.publicKey.skkey, peermgr.switch.peerInfo.privateKey.skkey,
183183
)
184184
if bootnodes.len < mixMixPoolSize:
185-
warn "publishing with mix won't work until atleast 3 mix nodes in node pool"
185+
warn "publishing with mix won't work until there are 3 mix nodes in node pool"
186186
let initTable = processBootNodes(bootnodes, peermgr)
187187

188188
if len(initTable) < mixMixPoolSize:
189-
warn "publishing with mix won't work until atleast 3 mix nodes in node pool"
189+
warn "publishing with mix won't work until there are 3 mix nodes in node pool"
190190
var m = WakuMix(peerManager: peermgr, clusterId: clusterId, pubKey: mixPubKey)
191191
procCall MixProtocol(m).init(localMixNodeInfo, initTable, peermgr.switch)
192192
return ok(m)

waku/waku_rendezvous/protocol.nim

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ import
2626
./common,
2727
./waku_peer_record
2828

29-
# Explicitly make the items iterator visible in this module's scope
30-
# This is needed for generic instantiation of rendezvous methods
31-
iterator items*[T](o: OffsettedSeq[T]): T =
32-
for item in offsettedseq.items(o):
33-
yield item
34-
3529
logScope:
3630
topics = "waku rendezvous"
3731

0 commit comments

Comments
 (0)