// 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)); } }
// 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); } }