mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 22:43:09 +00:00
fix issues in refactor
This commit is contained in:
parent
1c405fa13f
commit
95ab9c7239
2
vendor/mix
vendored
2
vendor/mix
vendored
@ -1 +1 @@
|
||||
Subproject commit 9c74e4a356c7cd0bf45be13c20702a8dd15edc04
|
||||
Subproject commit e2e2cac2da129fb9bad340b3086fc8a39eec9b70
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user