Skip to content

Commit 0710171

Browse files
committed
fix lightpushwithmix example
1 parent 55e657d commit 0710171

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ liteprotocoltester: | build deps librln
233233
echo -e $(BUILD_MSG) "build/$@" && \
234234
$(ENV_SCRIPT) nim liteprotocoltester $(NIM_PARAMS) waku.nims
235235

236+
lightpushwithmix: | build deps librln
237+
echo -e $(BUILD_MSG) "build/$@" && \
238+
$(ENV_SCRIPT) nim lightpushwithmix $(NIM_PARAMS) waku.nims
239+
236240
build/%: | build deps librln
237241
echo -e $(BUILD_MSG) "build/$*" && \
238242
$(ENV_SCRIPT) nim buildone $(NIM_PARAMS) waku.nims $*

examples/lightpush_publisher_mix.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import
77
chronos,
88
confutils,
99
libp2p/crypto/crypto,
10+
libp2p/crypto/curve25519,
1011
libp2p/multiaddress,
1112
eth/keys,
1213
eth/p2p/discoveryv5/enr
@@ -98,7 +99,7 @@ proc setupAndPublish(rng: ref HmacDrbgContext) {.async.} =
9899
)
99100
node.peerManager.addServicePeer(pxPeerInfo2, WakuPeerExchangeCodec)
100101
(
101-
await node.mountMix("401dd1eb5582f6dc9488d424aa26ed1092becefcf8543172e6d92c17ed07265a")
102+
await node.mountMix(intoCurve25519Key(ncrutils.fromHex("401dd1eb5582f6dc9488d424aa26ed1092becefcf8543172e6d92c17ed07265a")))
102103
).isOkOr:
103104
error "failed to mount waku mix protocol: ", error = $error
104105
return

waku.nimble

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ task example2, "Build Waku examples":
132132
buildBinary "subscriber", "examples/"
133133
buildBinary "filter_subscriber", "examples/"
134134
buildBinary "lightpush_publisher", "examples/"
135-
buildBinary "lightpush_publisher_mix", "examples/"
136135

137136
task chat2, "Build example Waku chat usage":
138137
# NOTE For debugging, set debug level. For chat usage we want minimal log
@@ -150,6 +149,10 @@ task liteprotocoltester, "Build liteprotocoltester":
150149
let name = "liteprotocoltester"
151150
buildBinary name, "apps/liteprotocoltester/"
152151

152+
task lightpushwithmix, "Build lightpushwithmix":
153+
let name = "lightpush_publisher_mix"
154+
buildBinary name, "examples/"
155+
153156
task buildone, "Build custom target":
154157
let filepath = paramStr(paramCount())
155158
discard buildModule filepath

0 commit comments

Comments
 (0)