From 685487a605e3f5df120c3ae56a2b12713c0ff5d2 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Wed, 30 Mar 2022 08:26:06 -0400 Subject: [PATCH] Use parseVoteExtension instead of custom parsing in PrepareProposal Signed-off-by: Thane Thomson --- test/e2e/app/app.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index f41fa2ac0..d424199e3 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -320,10 +320,10 @@ func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.Re if !vote.SignedLastBlock || len(vote.VoteExtension) == 0 { continue } - extValue, errVal := binary.Varint(vote.VoteExtension) + extValue, err := parseVoteExtension(vote.VoteExtension) // This should have been verified in VerifyVoteExtension - if errVal <= 0 { - panic(fmt.Sprintf("Failed to parse vote extension. Got return value %d", errVal)) + if err != nil { + panic(fmt.Errorf("failed to parse vote extension in PrepareProposal: %w", err)) } valAddr := crypto.Address(vote.Validator.Address) app.logger.Info("got vote extension value in PrepareProposal", "valAddr", valAddr, "value", extValue)