mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-06 18:11:19 +00:00
log error when we fail to add new address
This commit is contained in:
parent
3b3f45d49b
commit
34b77fcad4
@ -164,7 +164,10 @@ func (r *PEXReactor) AddPeer(p Peer) {
|
|||||||
// peers when we need - we don't trust inbound peers as much.
|
// peers when we need - we don't trust inbound peers as much.
|
||||||
addr := p.NodeInfo().NetAddress()
|
addr := p.NodeInfo().NetAddress()
|
||||||
if !isAddrPrivate(addr, r.config.PrivatePeerIDs) {
|
if !isAddrPrivate(addr, r.config.PrivatePeerIDs) {
|
||||||
r.book.AddAddress(addr, addr)
|
err := r.book.AddAddress(addr, addr)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("Failed to add new address", "err", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,7 +268,10 @@ func (r *PEXReactor) ReceiveAddrs(addrs []*p2p.NetAddress, src Peer) error {
|
|||||||
srcAddr := src.NodeInfo().NetAddress()
|
srcAddr := src.NodeInfo().NetAddress()
|
||||||
for _, netAddr := range addrs {
|
for _, netAddr := range addrs {
|
||||||
if netAddr != nil && !isAddrPrivate(netAddr, r.config.PrivatePeerIDs) {
|
if netAddr != nil && !isAddrPrivate(netAddr, r.config.PrivatePeerIDs) {
|
||||||
r.book.AddAddress(netAddr, srcAddr)
|
err := r.book.AddAddress(netAddr, srcAddr)
|
||||||
|
if err != nil {
|
||||||
|
r.Logger.Error("Failed to add new address", "err", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user