Skip to content

Commit

Permalink
Merge branch 'master' into chore-merge-release-v0.33-to-master
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Sep 30, 2024
2 parents 73c1d60 + 8b0884c commit eebce3c
Show file tree
Hide file tree
Showing 25 changed files with 3,879 additions and 3,374 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
if: ${{ steps.secrets.outcome == 'success' }}
run: |
make -j${NPROC} V=1 QUICK_AND_DIRTY_COMPILER=1 NIMFLAGS="-d:disableMarchNative -d:postgres" wakunode2
make -j${NPROC} V=1 QUICK_AND_DIRTY_COMPILER=1 NIMFLAGS="-d:disableMarchNative -d:postgres -d:chronicles_colors:none" wakunode2
SHORT_REF=$(git rev-parse --short HEAD)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
ref: master

- name: download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4

- name: prep variables
id: vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
tar -cvzf ${{steps.vars.outputs.nwaku}} ./build/
- name: Upload asset
uses: actions/upload-artifact@v2.2.3
uses: actions/upload-artifact@v4.4.0
with:
name: ${{steps.vars.outputs.nwaku}}
path: ${{steps.vars.outputs.nwaku}}
Expand Down
6 changes: 3 additions & 3 deletions apps/liteprotocoltester/diagnose_connections.nim
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ logScope:
proc logSelfPeersLoop(pm: PeerManager, interval: Duration) {.async.} =
trace "Starting logSelfPeersLoop diagnosis loop"
while true:
let selfLighpushPeers = pm.peerStore.getPeersByProtocol(WakuLightPushCodec)
let selfRelayPeers = pm.peerStore.getPeersByProtocol(WakuRelayCodec)
let selfFilterPeers = pm.peerStore.getPeersByProtocol(WakuFilterSubscribeCodec)
let selfLighpushPeers = pm.wakuPeerStore.getPeersByProtocol(WakuLightPushCodec)
let selfRelayPeers = pm.wakuPeerStore.getPeersByProtocol(WakuRelayCodec)
let selfFilterPeers = pm.wakuPeerStore.getPeersByProtocol(WakuFilterSubscribeCodec)

let printable = catch:
"""*------------------------------------------------------------------------------------------*
Expand Down
2 changes: 1 addition & 1 deletion apps/wakucanary/wakucanary.nim
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ proc main(rng: ref HmacDrbgContext): Future[int] {.async.} =
return 1

let lp2pPeerStore = node.switch.peerStore
let conStatus = node.peerManager.peerStore[ConnectionBook][peer.peerId]
let conStatus = node.peerManager.wakuPeerStore[ConnectionBook][peer.peerId]

if conf.ping:
discard await pingFut
Expand Down
5 changes: 3 additions & 2 deletions examples/publisher.nim
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ proc setupAndPublish(rng: ref HmacDrbgContext) {.async.} =

# wait for a minimum of peers to be connected, otherwise messages wont be gossiped
while true:
let numConnectedPeers =
node.peerManager.peerStore[ConnectionBook].book.values().countIt(it == Connected)
let numConnectedPeers = node.peerManager.wakuPeerStore[ConnectionBook].book
.values()
.countIt(it == Connected)
if numConnectedPeers >= 6:
notice "publisher is ready", connectedPeers = numConnectedPeers, required = 6
break
Expand Down
5 changes: 3 additions & 2 deletions examples/subscriber.nim
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ proc setupAndSubscribe(rng: ref HmacDrbgContext) {.async.} =

# wait for a minimum of peers to be connected, otherwise messages wont be gossiped
while true:
let numConnectedPeers =
node.peerManager.peerStore[ConnectionBook].book.values().countIt(it == Connected)
let numConnectedPeers = node.peerManager.wakuPeerStore[ConnectionBook].book
.values()
.countIt(it == Connected)
if numConnectedPeers >= 6:
notice "subscriber is ready", connectedPeers = numConnectedPeers, required = 6
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ proc process*(
return err(ret.error)
of GET_ALL_PEER_IDS:
## returns a comma-separated string of peerIDs
let peerIDs = waku.node.peerManager.peerStore.peers().mapIt($it.peerId).join(",")
let peerIDs =
waku.node.peerManager.wakuPeerStore.peers().mapIt($it.peerId).join(",")
return ok(peerIDs)
of GET_PEER_IDS_BY_PROTOCOL:
## returns a comma-separated string of peerIDs that mount the given protocol
Expand Down
Loading

0 comments on commit eebce3c

Please sign in to comment.