github.com/516108736/tendermint@v0.36.0/light/provider/errors.go (about)

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