Skip to content

Commit 09f2af4

Browse files
committed
chore: stop with waku node
1 parent a76af7b commit 09f2af4

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

examples/pingpong.nim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ proc main() {.async.} =
2121
var cfg_saro = DefaultConfig()
2222
var cfg_raya = DefaultConfig()
2323

24-
# Cross pollinate Peers - No Waku discovery is used in this example
25-
# cfg_saro.staticPeers.add(cfg_raya.getMultiAddr())
26-
# cfg_raya.staticPeers.add(cfg_saro.getMultiAddr())
27-
2824
let sKey = loadPrivateKeyFromBytes(@[45u8, 216, 160, 24, 19, 207, 193, 214, 98, 92, 153, 145, 222, 247, 101, 99, 96, 131, 149, 185, 33, 187, 229, 251, 100, 158, 20, 131, 111, 97, 181, 210]).get()
2925
let rKey = loadPrivateKeyFromBytes(@[43u8, 12, 160, 51, 212, 90, 199, 160, 154, 164, 129, 229, 147, 69, 151, 17, 239, 51, 190, 33, 86, 164, 50, 105, 39, 250, 182, 116, 138, 132, 114, 234]).get()
3026

@@ -79,7 +75,7 @@ proc main() {.async.} =
7975
let raya_bundle = raya.createIntroBundle()
8076
discard await saro.newPrivateConversation(raya_bundle)
8177

82-
await sleepAsync(200.seconds) # Run for some time
78+
await sleepAsync(20.seconds) # Run for some time
8379

8480
saro.stop()
8581
raya.stop()

src/chat/client.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,5 +293,6 @@ proc start*(client: Client) {.async.} =
293293

294294
proc stop*(client: Client) =
295295
## Stop the client.
296+
client.ds.stop()
296297
client.isRunning = false
297298
notice "Client stopped", client = client.getId()

src/chat/delivery/waku_client.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ type
7272

7373
proc DefaultConfig*(): WakuConfig =
7474
let nodeKey = crypto.PrivateKey.random(Secp256k1, crypto.newRng()[])[]
75-
let clusterId = 19'u16
76-
let shardId = 0'u16
75+
let clusterId = 16'u16
76+
let shardId = 32'u16
7777
var port: uint16 = 50000'u16 + uint16(rand(200))
7878

7979
result = WakuConfig(nodeKey: nodeKey, port: port, clusterId: clusterId,
@@ -162,7 +162,7 @@ proc start*(client: WakuClient) {.async.} =
162162

163163
client.node.peerManager.start()
164164

165-
let dnsDiscoveryUrl = "enrtree://AIRVQ5DDA4FFWLRBCHJWUWOO6X6S4ZTZ5B667LQ6AJU6PEYDLRD5O@sandbox.waku.nodes.status.im"
165+
let dnsDiscoveryUrl = "enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@boot.staging.status.nodes.status.im"
166166
let nameServer = parseIpAddress("1.1.1.1")
167167
let discoveredPeers = await retrieveDynamicBootstrapNodes(dnsDiscoveryUrl, @[nameServer])
168168
if discoveredPeers.isOk:

0 commit comments

Comments
 (0)