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.

25 lines
617 B

  1. package provider
  2. import (
  3. "errors"
  4. "fmt"
  5. )
  6. var (
  7. // ErrLightBlockNotFound is returned when a provider can't find the
  8. // requested header.
  9. ErrLightBlockNotFound = errors.New("light block not found")
  10. // ErrNoResponse is returned if the provider doesn't respond to the
  11. // request in a gieven time
  12. ErrNoResponse = errors.New("client failed to respond")
  13. )
  14. // ErrBadLightBlock is returned when a provider returns an invalid
  15. // light block.
  16. type ErrBadLightBlock struct {
  17. Reason error
  18. }
  19. func (e ErrBadLightBlock) Error() string {
  20. return fmt.Sprintf("client provided bad signed header: %s", e.Reason.Error())
  21. }