diff --git a/consensus/replay.go b/consensus/replay.go index 71dc81b5..2104ffd5 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -115,35 +115,13 @@ func (cs *ConsensusState) catchupReplay(csHeight int) error { gr, found, err = cs.wal.group.Search("#ENDHEIGHT: ", makeHeightSearchFunc(csHeight-1)) if err == io.EOF { cs.Logger.Error("Replay: wal.group.Search returned EOF", "#ENDHEIGHT", csHeight-1) - // if we upgraded from 0.9 to 0.9.1, we may have #HEIGHT instead - // TODO (0.10.0): remove this - gr, found, err = cs.wal.group.Search("#HEIGHT: ", makeHeightSearchFunc(csHeight)) - if err == io.EOF { - cs.Logger.Error("Replay: wal.group.Search returned EOF", "#HEIGHT", csHeight) - return nil - } else if err != nil { - return err - } } else if err != nil { return err } else { defer gr.Close() } if !found { - // if we upgraded from 0.9 to 0.9.1, we may have #HEIGHT instead - // TODO (0.10.0): remove this - gr, _, err = cs.wal.group.Search("#HEIGHT: ", makeHeightSearchFunc(csHeight)) - if err == io.EOF { - cs.Logger.Error("Replay: wal.group.Search returned EOF", "#HEIGHT", csHeight) - return nil - } else if err != nil { - return err - } else { - defer gr.Close() - } - - // TODO (0.10.0): uncomment - // return errors.New(cmn.Fmt("Cannot replay height %d. WAL does not contain #ENDHEIGHT for %d.", csHeight, csHeight-1)) + return errors.New(cmn.Fmt("Cannot replay height %d. WAL does not contain #ENDHEIGHT for %d.", csHeight, csHeight-1)) } cs.Logger.Info("Catchup by replaying consensus messages", "height", csHeight)