You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
653 B

  1. package pex
  2. import (
  3. "fmt"
  4. "github.com/tendermint/tendermint/p2p"
  5. )
  6. type ErrAddrBookNonRoutable struct {
  7. Addr *p2p.NetAddress
  8. }
  9. func (err ErrAddrBookNonRoutable) Error() string {
  10. return fmt.Sprintf("Cannot add non-routable address %v", err.Addr)
  11. }
  12. type ErrAddrBookSelf struct {
  13. Addr *p2p.NetAddress
  14. }
  15. func (err ErrAddrBookSelf) Error() string {
  16. return fmt.Sprintf("Cannot add ourselves with address %v", err.Addr)
  17. }
  18. type ErrAddrBookNilAddr struct {
  19. Addr *p2p.NetAddress
  20. Src *p2p.NetAddress
  21. }
  22. func (err ErrAddrBookNilAddr) Error() string {
  23. return fmt.Sprintf("Cannot add a nil address. Got (addr, src) = (%v, %v)", err.Addr, err.Src)
  24. }