Exemple #1
0
 // Returns whether or not a peer is blacklisted
 private bool IsPeerBlacklisted(PeerCandidate Peer)
 {
     // Lock blacklist to prevent race conditions
     lock (PeerBlackList)
     {
         // Return whether or not the blacklist contains this peer
         return(PeerBlackList.Contains(Peer.Id));
     }
 }
Exemple #2
0
 // Adds a peer to the list of blacklisted peers
 private void AddBlacklistedPeer(PeerCandidate Peer)
 {
     // Lock blacklist to prevent race conditions
     lock (PeerBlackList)
     {
         // Add the peer id to the list
         PeerBlackList.Add(Peer.Id);
     }
 }