fix issues in refactor

This commit is contained in:
Prem Chaitanya Prathi 2025-04-14 14:19:48 +05:30
parent 1c405fa13f
commit 95ab9c7239
2 changed files with 13 additions and 10 deletions

2
vendor/mix vendored

@ -1 +1 @@
Subproject commit 9c74e4a356c7cd0bf45be13c20702a8dd15edc04
Subproject commit e2e2cac2da129fb9bad340b3086fc8a39eec9b70

View File

@ -1,19 +1,22 @@
{.push raises: [].}
import chronicles, std/[options], chronos, results
import chronicles, std/[options, sequtils], chronos, results, metrics
import
libp2p/crypto/curve25519,
mix/mix_protocol,
mix/mix_node,
mix/mix_metrics,
mix/tag_manager,
libp2p/[multiaddress, multicodec, peerid]
import
../node/peer_manager,
../waku_core,
../waku_enr/mix,
../waku_enr,
../node/peer_manager/waku_peer_store
../node/peer_manager/waku_peer_store,
../common/nimchronos
logScope:
topics = "waku mix"
@ -136,17 +139,17 @@ proc new*(
let mixPubKey = public(mixPrivKey)
info "mixPrivKey", mixPrivKey = mixPrivKey, mixPubKey = mixPubKey
# TODO : ideally mix should not be marked ready until certain min pool of mixNodes are discovered
var m: WakuMix
let localMixNodeInfo = initMixNodeInfo(
nodeAddr, mixPubKey, mixPrivKey, switch.peerInfo.publicKey.skkey,
switch.peerInfo.privateKey.skkey,
)
m = initMix(localMixNodeInfo, switch, initTable[PeerId, MixPubInfo]())
m.peerManager = peermgr
m.clusterId = clusterId
return
# TODO : ideally mix should not be marked ready until certain min pool of mixNodes are discovered
var m = WakuMix(peerManager: peermgr, clusterId: clusterId)
m.init(localMixNodeInfo, switch, initTable[PeerId, MixPubInfo]())
procCall MixProtocol(m).init()
return ok(m)
proc start*(mix: Wakumix) =
discard mix.startMixNodePoolMgr()