added banned address error

This commit is contained in:
Callum Michael Waters
2020-03-11 16:31:03 +01:00
parent 60d375eba6
commit 65d86bcad1

View File

@@ -63,3 +63,11 @@ type ErrAddrBookInvalidAddr struct {
func (err ErrAddrBookInvalidAddr) Error() string {
return fmt.Sprintf("Cannot add invalid address %v: %v", err.Addr, err.AddrErr)
}
type ErrAddressBanned struct {
Addr *p2p.NetAddress
}
func (err ErrAddressBanned) Error() string {
return fmt.Sprintf("Address: %v is currently banned", err.Addr)
}