1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-06-23 01:41:31 +00:00
Files
.circleci
.github
DOCKER
abci
benchmarks
blockchain
cmd
config
consensus
crypto
docs
evidence
libs
lite
client
errors
proxy
base_verifier.go
base_verifier_test.go
commit.go
dbprovider.go
doc.go
dynamic_verifier.go
dynamic_verifier_test.go
helpers.go
multiprovider.go
provider.go
provider_test.go
types.go
mempool
networks
node
p2p
privval
proxy
rpc
scripts
state
test
tools
types
version
.editorconfig
.gitignore
CHANGELOG.md
CHANGELOG_PENDING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
ROADMAP.md
SECURITY.md
Vagrantfile
appveyor.yml
codecov.yml
docker-compose.yml
tendermint/lite/provider.go

33 lines
1014 B
Go
Raw Normal View History

2017-11-09 17:37:18 -05:00
package lite
2017-10-24 12:34:36 +02:00
import (
"github.com/tendermint/tendermint/types"
2018-07-02 14:58:07 -04:00
log "github.com/tendermint/tendermint/libs/log"
)
2017-10-24 12:34:36 +02:00
// Provider provides information for the lite client to sync validators.
// Examples: MemProvider, files.Provider, client.Provider, CacheProvider.
type Provider interface {
2017-10-24 12:34:36 +02:00
// LatestFullCommit returns the latest commit with minHeight <= height <=
// maxHeight.
// If maxHeight is zero, returns the latest where minHeight <= height.
LatestFullCommit(chainID string, minHeight, maxHeight int64) (FullCommit, error)
2017-10-24 12:34:36 +02:00
// Get the valset that corresponds to chainID and height and return.
// Height must be >= 1.
ValidatorSet(chainID string, height int64) (*types.ValidatorSet, error)
// Set a logger.
SetLogger(logger log.Logger)
2017-10-24 12:34:36 +02:00
}
// A provider that can also persist new information.
// Examples: MemProvider, files.Provider, CacheProvider.
type PersistentProvider interface {
Provider
2017-10-24 12:34:36 +02:00
// SaveFullCommit saves a FullCommit (without verification).
SaveFullCommit(fc FullCommit) error
2017-10-24 12:34:36 +02:00
}