public NodeLauncherFactory(IRpcNodeFactory rpcNodeFactory, IBlockChainStore blockChainStore, IMessageCoordinator messageCoordinator, ISmartContractStore smartContractStore) { _rpcNodeFactory = rpcNodeFactory; _blockChainStore = blockChainStore; _messageCoordinator = messageCoordinator; _smartContractStore = smartContractStore; }
internal NodeLauncher(Networks network, ServiceFlags serviceFlag, IRpcNodeFactory rpcNodeFactory, IBlockChainStore blockChainStore, IMessageCoordinator messageCoordinator, ISmartContractStore smartContractStore) { _network = network; _serviceFlag = serviceFlag; _p2pNetworkConnector = new P2PNetworkConnector(messageCoordinator); _p2pNetworkConnector.ConnectEvent += P2PConnectEvent; _p2pNetworkConnector.DisconnectEvent += P2PDisconnectEvent; _p2pNode = new P2PNode(_network, _serviceFlag, _p2pNetworkConnector, messageCoordinator); _rpcNode = rpcNodeFactory.Build(_network); blockChainStore.Switch(network); smartContractStore.Switch(network); _blockChain = blockChainStore.GetBlockChain(); }