diff --git a/Makefile b/Makefile index e43bedb701..df76918115 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ GithubTop=github.com -Version=v1.1.4.2 +Version=v1.1.4.3 CosmosSDK=v0.39.2 Tendermint=v0.33.9 Iavl=v0.14.3 diff --git a/libs/cosmos-sdk/server/start.go b/libs/cosmos-sdk/server/start.go index 8597271213..6785b3e893 100644 --- a/libs/cosmos-sdk/server/start.go +++ b/libs/cosmos-sdk/server/start.go @@ -4,12 +4,12 @@ package server import ( "fmt" + "os" + "runtime/pprof" + sdk "github.com/okex/exchain/libs/cosmos-sdk/types" "github.com/okex/exchain/libs/system" - "github.com/okex/exchain/libs/tendermint/global" "github.com/okex/exchain/libs/tendermint/libs/log" - "os" - "runtime/pprof" "github.com/okex/exchain/libs/cosmos-sdk/baseapp" "github.com/okex/exchain/libs/cosmos-sdk/client/context" @@ -297,8 +297,6 @@ func startInProcess(ctx *Context, cdc *codec.Codec, appCreator AppCreator, appSt return nil, err } - global.SetGlobalHeight(tmNode.ConsensusState().Height) - app.SetOption(abci.RequestSetOption{ Key: "CheckChainID", Value: tmNode.ConsensusState().GetState().ChainID, diff --git a/libs/tendermint/node/node.go b/libs/tendermint/node/node.go index 8a2cc31215..350f9e4047 100644 --- a/libs/tendermint/node/node.go +++ b/libs/tendermint/node/node.go @@ -10,6 +10,8 @@ import ( "strings" "time" + "github.com/okex/exchain/libs/tendermint/global" + "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -572,6 +574,7 @@ func NewNode(config *cfg.Config, if err != nil { return nil, err } + global.SetGlobalHeight(state.LastBlockHeight) // Create the proxyApp and establish connections to the ABCI app (consensus, mempool, query). proxyApp, err := createAndStartProxyAppConns(clientCreator, logger)