Skip to content

Commit

Permalink
Merge PR: fix replay bug (#1013)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiataiping and [email protected] authored Sep 8, 2021
1 parent 9dbc6ba commit 77e6ade
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/exchaind/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,12 @@ func doReplay(ctx *server.Context, state sm.State, stateStoreDB dbm.DB,
log.Println("origin latest block height", "height", originLatestBlockHeight)

haltheight := haltBlockHeight
if haltheight <= startBlockHeight {
panic("haltheight <= startBlockHeight please check data or height")
}

if haltheight == 0 {
haltheight = originLatestBlockHeight
}
if haltheight <= startBlockHeight {
panic("haltheight <= startBlockHeight please check data or height")
}

log.Println("replay stop block height", "height", haltheight)

Expand Down

0 comments on commit 77e6ade

Please sign in to comment.