Files
tendermint/light/provider/provider.go
Marko c2578e2262 light: rename lite2 to light & remove lite (#4946)
This PR removes lite & renames lite2 to light throughout the repo

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

Closes: #4944
2020-06-03 10:13:42 +00:00

39 lines
1.1 KiB
Go

package provider
import (
"github.com/tendermint/tendermint/types"
)
// Provider provides information for the light client to sync (verification
// happens in the client).
type Provider interface {
// ChainID returns the blockchain ID.
ChainID() string
// SignedHeader returns the SignedHeader that corresponds to the given
// height.
//
// 0 - the latest.
// height must be >= 0.
//
// If the provider fails to fetch the SignedHeader due to the IO or other
// issues, an error will be returned.
// If there's no SignedHeader for the given height, ErrSignedHeaderNotFound
// error is returned.
SignedHeader(height int64) (*types.SignedHeader, error)
// ValidatorSet returns the ValidatorSet that corresponds to height.
//
// 0 - the latest.
// height must be >= 0.
//
// If the provider fails to fetch the ValidatorSet due to the IO or other
// issues, an error will be returned.
// If there's no ValidatorSet for the given height, ErrValidatorSetNotFound
// error is returned.
ValidatorSet(height int64) (*types.ValidatorSet, error)
// ReportEvidence reports an evidence of misbehavior.
ReportEvidence(ev types.Evidence) error
}