Skip to content

Commit

Permalink
fix(e2e): invalid initial height in e2e vote extensions test (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek authored Jul 19, 2022
1 parent 97821aa commit 38dcdf3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (app *Application) Info(_ context.Context, req *abci.RequestInfo) (*abci.Re
}, nil
}

// Info implements ABCI.
// InitChain implements ABCI.
func (app *Application) InitChain(_ context.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) {
app.mu.Lock()
defer app.mu.Unlock()
Expand Down Expand Up @@ -441,7 +441,11 @@ func (app *Application) ProcessProposal(_ context.Context, req *abci.RequestProc
func (app *Application) ExtendVote(_ context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) {
// We ignore any requests for vote extensions that don't match our expected
// next height.
if req.Height != int64(app.state.Height)+1 {
currentHeight := app.state.Height
if currentHeight == 0 {
currentHeight = app.state.initialHeight
}
if req.Height != int64(currentHeight)+1 {
app.logger.Error(
"got unexpected height in ExtendVote request",
"expectedHeight", app.state.Height+1,
Expand Down

0 comments on commit 38dcdf3

Please sign in to comment.