コード例 #1
0
ファイル: Discovery.cs プロジェクト: Sajo8/cs-turtlecoin
 // 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));
     }
 }
コード例 #2
0
ファイル: Discovery.cs プロジェクト: Sajo8/cs-turtlecoin
 // 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);
     }
 }