From 54c63726b03cbba067d10fa6b69b885c85678d17 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 6 Sep 2017 16:40:21 -0400 Subject: [PATCH] p2p: minor comment fixes --- p2p/peer_set.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/peer_set.go b/p2p/peer_set.go index 19531731..a5a443d8 100644 --- a/p2p/peer_set.go +++ b/p2p/peer_set.go @@ -35,8 +35,8 @@ func NewPeerSet() *PeerSet { } } -// Add returns false if the peer's Key (PubKeyEd25519) is already memoized. -// If the peer was already added, it returns ErrSwitchDuplicatePeer. +// Add adds the peer to the PeerSet. +// It returns ErrSwitchDuplicatePeer if the peer is already present. func (ps *PeerSet) Add(peer *Peer) error { ps.mtx.Lock() defer ps.mtx.Unlock() @@ -52,7 +52,7 @@ func (ps *PeerSet) Add(peer *Peer) error { return nil } -// Has returns true iff the peerset contains +// Has returns true iff the PeerSet contains // the peer referred to by this peerKey. func (ps *PeerSet) Has(peerKey string) bool { ps.mtx.Lock()