mirror of
https://github.com/tendermint/tendermint.git
synced 2025-12-23 06:15:19 +00:00
state: proto migration (#4972)
## Description the second part of state proto migration Closes: #XXX
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
lighthttp "github.com/tendermint/tendermint/light/provider/http"
|
||||
lightrpc "github.com/tendermint/tendermint/light/rpc"
|
||||
lightdb "github.com/tendermint/tendermint/light/store/db"
|
||||
tmstate "github.com/tendermint/tendermint/proto/state"
|
||||
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
@@ -36,14 +37,14 @@ type StateProvider interface {
|
||||
type lightClientStateProvider struct {
|
||||
sync.Mutex // light.Client is not concurrency-safe
|
||||
lc *light.Client
|
||||
version sm.Version
|
||||
version tmstate.Version
|
||||
providers map[lightprovider.Provider]string
|
||||
}
|
||||
|
||||
// NewLightClientStateProvider creates a new StateProvider using a light client and RPC clients.
|
||||
func NewLightClientStateProvider(
|
||||
chainID string,
|
||||
version sm.Version,
|
||||
version tmstate.Version,
|
||||
servers []string,
|
||||
trustOptions light.TrustOptions,
|
||||
logger log.Logger,
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
p2pmocks "github.com/tendermint/tendermint/p2p/mocks"
|
||||
tmstate "github.com/tendermint/tendermint/proto/state"
|
||||
ssproto "github.com/tendermint/tendermint/proto/statesync"
|
||||
tmversion "github.com/tendermint/tendermint/proto/version"
|
||||
"github.com/tendermint/tendermint/proxy"
|
||||
@@ -44,7 +45,7 @@ func simplePeer(id string) *p2pmocks.Peer {
|
||||
func TestSyncer_SyncAny(t *testing.T) {
|
||||
state := sm.State{
|
||||
ChainID: "chain",
|
||||
Version: sm.Version{
|
||||
Version: tmstate.Version{
|
||||
Consensus: tmversion.Consensus{
|
||||
Block: version.BlockProtocol,
|
||||
App: 0,
|
||||
|
||||
Reference in New Issue
Block a user