diff --git a/apps/chat2mix/chat2mix.nim b/apps/chat2mix/chat2mix.nim index 13ff3530e..536b34ea8 100644 --- a/apps/chat2mix/chat2mix.nim +++ b/apps/chat2mix/chat2mix.nim @@ -494,7 +494,10 @@ proc processInput(rfd: AsyncFD, rng: ref HmacDrbgContext) {.async.} = ), node.peerManager, getMixNodePoolSize = proc(): int {.gcsafe, raises: [].} = - if node.wakuMix.isNil(): 0 else: node.getMixNodePoolSize(), + if node.wakuMix.isNil(): + 0 + else: + node.getMixNodePoolSize(), isNodeStarted = proc(): bool {.gcsafe, raises: [].} = node.started, ).valueOr: diff --git a/waku/discovery/waku_kademlia.nim b/waku/discovery/waku_kademlia.nim index a3927ac60..57e2fc5a0 100644 --- a/waku/discovery/waku_kademlia.nim +++ b/waku/discovery/waku_kademlia.nim @@ -82,13 +82,15 @@ proc new*( info "kademlia discovery created", bootstrapNodes = params.bootstrapNodes.len, advertiseMix = params.advertiseMix - ok(WakuKademlia( - protocol: kademlia, - peerManager: peerManager, - running: false, - getMixNodePoolSize: getMixNodePoolSize, - isNodeStarted: isNodeStarted, - )) + ok( + WakuKademlia( + protocol: kademlia, + peerManager: peerManager, + running: false, + getMixNodePoolSize: getMixNodePoolSize, + isNodeStarted: isNodeStarted, + ) + ) proc extractMixPubKey(service: ServiceInfo): Option[Curve25519Key] = if service.id != MixProtocolID: @@ -151,7 +153,9 @@ proc remotePeerInfoFrom(record: ExtendedPeerRecord): Option[RemotePeerInfo] = ) ) -proc lookupMixPeers*(wk: WakuKademlia): Future[Result[int, string]] {.async: (raises: []).} = +proc lookupMixPeers*( + wk: WakuKademlia +): Future[Result[int, string]] {.async: (raises: []).} = ## Lookup mix peers via kademlia and add them to the peer store. ## Returns the number of mix peers found and added. if wk.protocol.isNil(): @@ -185,9 +189,7 @@ proc lookupMixPeers*(wk: WakuKademlia): Future[Result[int, string]] {.async: (ra return ok(added) proc runDiscoveryLoop( - wk: WakuKademlia, - interval: Duration, - minMixPeers: int, + wk: WakuKademlia, interval: Duration, minMixPeers: int ) {.async: (raises: []).} = info "extended kademlia discovery loop started", interval = interval diff --git a/waku/factory/node_factory.nim b/waku/factory/node_factory.nim index 54be25149..20850bab2 100644 --- a/waku/factory/node_factory.nim +++ b/waku/factory/node_factory.nim @@ -188,7 +188,10 @@ proc setupProtocols( ), node.peerManager, getMixNodePoolSize = proc(): int {.gcsafe, raises: [].} = - if node.wakuMix.isNil(): 0 else: node.getMixNodePoolSize(), + if node.wakuMix.isNil(): + 0 + else: + node.getMixNodePoolSize(), isNodeStarted = proc(): bool {.gcsafe, raises: [].} = node.started, ).valueOr: