mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
peers use uuid to avoid duplicate connections
This commit is contained in:
@@ -34,7 +34,9 @@ func NewPeerSet() *PeerSet {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns false if peer with key (address) is already in set.
|
||||
// Returns false if peer with key (uuid) is already in set.
|
||||
// TODO: we may want to do other things like restrict how many peers
|
||||
// we're willing to connect to behind a single IP
|
||||
func (ps *PeerSet) Add(peer *Peer) bool {
|
||||
ps.mtx.Lock()
|
||||
defer ps.mtx.Unlock()
|
||||
|
Reference in New Issue
Block a user