github.com/number571/tendermint@v0.34.11-gost/light/provider/provider.go (about) 1 package provider 2 3 import ( 4 "context" 5 6 "github.com/number571/tendermint/types" 7 ) 8 9 //go:generate mockery --case underscore --name Provider 10 11 // Provider provides information for the light client to sync (verification 12 // happens in the client). 13 type Provider interface { 14 // LightBlock returns the LightBlock that corresponds to the given 15 // height. 16 // 17 // 0 - the latest. 18 // height must be >= 0. 19 // 20 // If the provider fails to fetch the LightBlock due to the IO or other 21 // issues, an error will be returned. 22 // If there's no LightBlock for the given height, ErrLightBlockNotFound 23 // error is returned. 24 LightBlock(ctx context.Context, height int64) (*types.LightBlock, error) 25 26 // ReportEvidence reports an evidence of misbehavior. 27 ReportEvidence(context.Context, types.Evidence) error 28 }