import std/sequtils import pkg/chronos import pkg/libp2p import pkg/codex/discovery import pkg/codex/stores import pkg/codex/blocktype as bt import pkg/codex/blockexchange import ../examples type NodesComponents* = tuple[ switch: Switch, blockDiscovery: Discovery, wallet: WalletRef, network: BlockExcNetwork, localStore: BlockStore, peerStore: PeerCtxStore, pendingBlocks: PendingBlocksManager, discovery: DiscoveryEngine, engine: BlockExcEngine, networkStore: NetworkStore] proc generateNodes*( num: Natural, blocks: openArray[bt.Block] = [] ): seq[NodesComponents] = for i in 0..