Browse Source

banned addresses can't be added again

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

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

@ -608,6 +608,10 @@ func (a *addrBook) addAddress(addr, src *p2p.NetAddress) error {
return ErrAddrBookInvalidAddr{Addr: addr, AddrErr: err}
}
if _, ok := a.badPeers[addr.ID]; ok {
return ErrAddressBanned{addr}
}
if _, ok := a.privateIDs[addr.ID]; ok {
return ErrAddrBookPrivate{addr}
}


Loading…
Cancel
Save