Skip to content

Commit

Permalink
Use RetreatLastBlock if blockHeight=stateHeight+1
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoyangLiu committed Nov 13, 2018
1 parent 2c5d88d commit aaa26a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
[[override]]
name = "github.com/tendermint/tendermint"
source = "https://github.com/irisnet/tendermint.git"
version = "=v0.23.1-rc0-iris1"
version = "=v0.23.1-rc0-iris2"

[[constraint]]
name = "github.com/rakyll/statik"
Expand Down
4 changes: 3 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ func (app *IrisApp) replay() int64 {
sm.SaveState(stateDB, preState)
loadHeight = preState.LastBlockHeight
} else if blockStore.Height() == curState.LastBlockHeight+1 {
loadHeight = curState.LastBlockHeight
blockStore.RetreatLastBlock()
sm.SaveState(stateDB, preState)
loadHeight = preState.LastBlockHeight
} else {
panic(errors.New("tendermint block store height should be at most one ahead of the its state height"))
}
Expand Down

0 comments on commit aaa26a6

Please sign in to comment.