mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 13:21:20 +00:00
p2p: minor comment fixes
This commit is contained in:
@ -35,8 +35,8 @@ func NewPeerSet() *PeerSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add returns false if the peer's Key (PubKeyEd25519) is already memoized.
|
// Add adds the peer to the PeerSet.
|
||||||
// If the peer was already added, it returns ErrSwitchDuplicatePeer.
|
// It returns ErrSwitchDuplicatePeer if the peer is already present.
|
||||||
func (ps *PeerSet) Add(peer *Peer) error {
|
func (ps *PeerSet) Add(peer *Peer) error {
|
||||||
ps.mtx.Lock()
|
ps.mtx.Lock()
|
||||||
defer ps.mtx.Unlock()
|
defer ps.mtx.Unlock()
|
||||||
@ -52,7 +52,7 @@ func (ps *PeerSet) Add(peer *Peer) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Has returns true iff the peerset contains
|
// Has returns true iff the PeerSet contains
|
||||||
// the peer referred to by this peerKey.
|
// the peer referred to by this peerKey.
|
||||||
func (ps *PeerSet) Has(peerKey string) bool {
|
func (ps *PeerSet) Has(peerKey string) bool {
|
||||||
ps.mtx.Lock()
|
ps.mtx.Lock()
|
||||||
|
Reference in New Issue
Block a user