don't auto mount network

This commit is contained in:
Dmitriy Ryajov 2022-04-19 19:19:51 -06:00
parent c3df822724
commit 9b729e0d76
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 2 additions and 6 deletions

View File

@ -11,10 +11,8 @@ import ../examples
proc generateNodes*( proc generateNodes*(
num: Natural, num: Natural,
blocks: openArray[bt.Block] = [], blocks: openArray[bt.Block] = []):
secureManagers: openarray[SecureProtocol] = [ seq[tuple[switch: Switch, blockexc: NetworkStore]] =
SecureProtocol.Noise,
]): seq[tuple[switch: Switch, blockexc: NetworkStore]] =
for i in 0..<num: for i in 0..<num:
let let
switch = newStandardSwitch(transportFlags = {ServerFlags.ReuseAddr}) switch = newStandardSwitch(transportFlags = {ServerFlags.ReuseAddr})
@ -25,8 +23,6 @@ proc generateNodes*(
engine = BlockExcEngine.new(localStore, wallet, network, discovery) engine = BlockExcEngine.new(localStore, wallet, network, discovery)
networkStore = NetworkStore.new(engine, localStore) networkStore = NetworkStore.new(engine, localStore)
switch.mount(network)
switch.mount(network) switch.mount(network)
result.add((switch, networkStore)) result.add((switch, networkStore))