Esempio n. 1
0
        private void RequestDeltaHeightFromPeers()
        {
            var totalPages = GetPageCount();

            _page %= totalPages;
            _page++;
            var peers = DeltaHeightRanker.GetPeers().Union(_peerRepository.TakeHighestReputationPeers(_page, _peersPerCycle).Select(x => x.PeerId));

            _peerClient.SendMessageToPeers(new LatestDeltaHashRequest(), peers);

            if (_page >= totalPages && DeltaHeightRanker.GetPeers().Count() >= _minimumPeers)
            {
                _hasLooped = true;
            }
        }