gitlab.com/gpdionisio/tendermint@v0.34.19-dev2/light/provider/errors.go (about)

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