/// <summary> /// Creates a PeerGroup with the given parameters. The connectionDelayMillis parameter controls how long the /// PeerGroup will wait between attempts to connect to nodes or read from any added peer discovery sources. /// </summary> public PeerGroup(IBlockStore blockStore, NetworkParameters networkNetworkParams, BlockChain chain) { _blockStore = blockStore; this.networkParams = networkNetworkParams; _chain = chain; peerConnectionPool = new ThreadWorkerPool(MaxPeerConnections); _inactives = new ConcurrentQueue <PeerAddress>(); _peers = new List <Peer>(); _peerDiscoverers = new List <IPeerDiscovery>(); peerGroupTimer = new SingleEntryTimer(PeerGroupTimerCallback); }
/// <summary> /// Creates a PeerGroup with the given parameters. The connectionDelayMillis parameter controls how long the /// PeerGroup will wait between attempts to connect to nodes or read from any added peer discovery sources. /// </summary> public PeerGroup(IBlockStore blockStore, NetworkParameters networkNetworkParams, BlockChain chain) { _blockStore = blockStore; this.networkParams = networkNetworkParams; _chain = chain; peerConnectionPool = new ThreadWorkerPool(MaxPeerConnections); _inactives = new ConcurrentQueue<PeerAddress>(); _peers = new List<Peer>(); _peerDiscoverers = new List<IPeerDiscovery>(); peerGroupTimer = new SingleEntryTimer(PeerGroupTimerCallback); }