Skip to content

Commit

Permalink
test(e2e): double-check that each vote extension has signature
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Dec 21, 2023
1 parent 658131a commit f93f40e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ func (app *Application) FinalizeBlock(ctx context.Context, req *abci.RequestFina
app.mu.Lock()
defer app.mu.Unlock()

for i, ext := range req.Commit.ThresholdVoteExtensions {
if len(ext.Signature) == 0 {
return &abci.ResponseFinalizeBlock{}, fmt.Errorf("vote extension signature is empty: %+v", ext)
}

app.logger.Debug("vote extension received in FinalizeBlock", "extension", ext, "i", i)
}

prevState := kvstore.NewKvState(db.NewMemDB(), 0)
if err := app.LastCommittedState.Copy(prevState); err != nil {
return &abci.ResponseFinalizeBlock{}, err
Expand Down

0 comments on commit f93f40e

Please sign in to comment.