Browse Source

added logs for more information

pull/4548/head
Callum Michael Waters 5 years ago
parent
commit
5de6ec78e5
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      p2p/pex/addrbook.go

+ 2
- 0
p2p/pex/addrbook.go View File

@ -351,6 +351,7 @@ func (a *addrBook) ReinstateBadPeers() {
bucket := a.calcNewBucket(ka.Addr, ka.Src)
a.addToNewBucket(ka, bucket)
delete(a.badPeers, ka.ID())
a.Logger.Info("Reinstated Address", "addr", ka.Addr)
}
}
}
@ -772,6 +773,7 @@ func (a *addrBook) addBadPeer(addr *p2p.NetAddress, banTime time.Duration) bool
// add to bad peer list
ka.ban(banTime)
a.badPeers[addr.ID] = ka
a.Logger.Info("Add address to blacklist", "addr", addr)
}
return true
}


Loading…
Cancel
Save