private async Task UpdatePeersAsync(xServerPeers xServerPeerList)
        {
            foreach (var peer in xServerPeerList.GetPeers())
            {
                string xServerURL       = Utils.GetServerUrl(peer.NetworkProtocol, peer.NetworkAddress, peer.NetworkPort);
                var    client           = new RestClient(xServerURL);
                var    pingRequest      = new RestRequest("/ping/", Method.GET);
                var    pingResponseTime = Stopwatch.StartNew();
                var    pingResult       = await client.ExecuteAsync <PingResult>(pingRequest).ConfigureAwait(false);

                pingResponseTime.Stop();
                if (pingResult.StatusCode == HttpStatusCode.OK)
                {
                    var pingData = pingResult.Data;
                    peer.Version      = pingData.Version;
                    peer.ResponseTime = pingResponseTime.ElapsedMilliseconds;
                    peer.Tier         = pingData.Tier;
                    SyncPeerToPeersList(xServerPeerList, peer);
                }
                else
                {
                    SyncPeerToPeersList(xServerPeerList, peer, removePeer: true);
                }
            }
        }
        private void SyncPeerToPeersList(xServerPeers xServerPeerList, xServerPeer peer, bool seedCheck = false, bool removePeer = false)
        {
            var peersList = xServerPeerList.GetPeers();
            int peerIndex = peersList.FindIndex(p => p.NetworkAddress == peer.NetworkAddress);

            if (removePeer)
            {
                peersList.Remove(peer);
            }
            else if (seedCheck)
            {
                if (peerIndex == -1)
                {
                    peersList.Add(peer);
                }
            }
            else
            {
                if (peerIndex >= 0)
                {
                    peersList[peerIndex] = peer;
                }
                else
                {
                    peersList.Add(peer);
                }
            }
            lock (this.xServerPeersLock)
            {
                xServerPeerList.ReplacePeers(peersList);
            }
        }