mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-03 18:42:14 +00:00
This change aims to keep versions of mockery consistent across developer laptops. This change adds mockery to the `tools.go` file so that its version can be managed consistently in the `go.mod` file. Additionally, this change temporarily disables adding mockery's version number to generated files. There is an outstanding issue against the mockery project related to the version string behavior when running from `go get`. I have created a pull request to fix this issue in the mockery project. see: https://github.com/vektra/mockery/issues/397
29 lines
799 B
Go
29 lines
799 B
Go
package provider
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tendermint/tendermint/types"
|
|
)
|
|
|
|
//go:generate ../../scripts/mockery_generate.sh Provider
|
|
|
|
// Provider provides information for the light client to sync (verification
|
|
// happens in the client).
|
|
type Provider interface {
|
|
// LightBlock returns the LightBlock that corresponds to the given
|
|
// height.
|
|
//
|
|
// 0 - the latest.
|
|
// height must be >= 0.
|
|
//
|
|
// If the provider fails to fetch the LightBlock due to the IO or other
|
|
// issues, an error will be returned.
|
|
// If there's no LightBlock for the given height, ErrLightBlockNotFound
|
|
// error is returned.
|
|
LightBlock(ctx context.Context, height int64) (*types.LightBlock, error)
|
|
|
|
// ReportEvidence reports an evidence of misbehavior.
|
|
ReportEvidence(context.Context, types.Evidence) error
|
|
}
|