mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-17 15:11:21 +00:00
update comment about outbound peers and addrbook
This commit is contained in:
@ -94,7 +94,10 @@ func (r *PEXReactor) GetChannels() []*ChannelDescriptor {
|
|||||||
// AddPeer implements Reactor by adding peer to the address book (if inbound)
|
// AddPeer implements Reactor by adding peer to the address book (if inbound)
|
||||||
// or by requesting more addresses (if outbound).
|
// or by requesting more addresses (if outbound).
|
||||||
func (r *PEXReactor) AddPeer(p *Peer) {
|
func (r *PEXReactor) AddPeer(p *Peer) {
|
||||||
if p.IsOutbound() { // For outbound peers, the address is already in the books
|
if p.IsOutbound() {
|
||||||
|
// For outbound peers, the address is already in the books.
|
||||||
|
// Either it was added in DialSeeds or when we
|
||||||
|
// received the peer's address in r.Receive
|
||||||
if r.book.NeedMoreAddrs() {
|
if r.book.NeedMoreAddrs() {
|
||||||
r.RequestPEX(p)
|
r.RequestPEX(p)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user