Extract node components to a variable to make Nim 2 happy

This commit is contained in:
Arnaud 2024-12-26 07:20:33 +01:00
parent 51a40548d1
commit ab39da8230
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -46,7 +46,8 @@ proc generateNodes*(
networkStore = NetworkStore.new(engine, localStore) networkStore = NetworkStore.new(engine, localStore)
switch.mount(network) switch.mount(network)
result.add((
let nc : NodesComponents = (
switch, switch,
discovery, discovery,
wallet, wallet,
@ -56,7 +57,9 @@ proc generateNodes*(
pendingBlocks, pendingBlocks,
blockDiscovery, blockDiscovery,
engine, engine,
networkStore)) networkStore)
result.add(nc)
proc connectNodes*(nodes: seq[Switch]) {.async.} = proc connectNodes*(nodes: seq[Switch]) {.async.} =
for dialer in nodes: for dialer in nodes: