state: proto migration (#4951)

This commit is contained in:
Marko
2020-06-05 10:47:16 +02:00
committed by GitHub
parent ee91312d34
commit b9af87c4ea
45 changed files with 5222 additions and 1471 deletions

View File

@@ -15,7 +15,6 @@ import (
"github.com/tendermint/tendermint/proxy"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/tendermint/version"
)
const (
@@ -263,7 +262,7 @@ func (s *syncer) Sync(snapshot *snapshot, chunks *chunkQueue) (sm.State, *types.
if err != nil {
return sm.State{}, nil, err
}
state.Version.Consensus.App = version.Protocol(appVersion)
state.Version.Consensus.App = appVersion
// Done! 🎉
s.logger.Info("Snapshot restored", "height", snapshot.Height, "format", snapshot.Format,

View File

@@ -15,6 +15,7 @@ import (
"github.com/tendermint/tendermint/p2p"
p2pmocks "github.com/tendermint/tendermint/p2p/mocks"
ssproto "github.com/tendermint/tendermint/proto/statesync"
tmversion "github.com/tendermint/tendermint/proto/version"
"github.com/tendermint/tendermint/proxy"
proxymocks "github.com/tendermint/tendermint/proxy/mocks"
sm "github.com/tendermint/tendermint/state"
@@ -44,7 +45,7 @@ func TestSyncer_SyncAny(t *testing.T) {
state := sm.State{
ChainID: "chain",
Version: sm.Version{
Consensus: version.Consensus{
Consensus: tmversion.Consensus{
Block: version.BlockProtocol,
App: 0,
},