From 89665e7d6734476b9fbcb662f7c2c31e13cbbdd7 Mon Sep 17 00:00:00 2001 From: Stevan Ognjanovic Date: Tue, 9 Jun 2020 17:15:32 +0200 Subject: [PATCH] types: Remove duplicated validation in VerifyCommit (#4991) --- types/validator_set.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/types/validator_set.go b/types/validator_set.go index 3591b9207..cf04df6dd 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -671,13 +671,6 @@ func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID, return fmt.Errorf("invalid commit -- wrong block ID: want %v, got %v", blockID, commit.BlockID) } - if height != commit.Height { - return NewErrInvalidCommitHeight(height, commit.Height) - } - if !blockID.Equals(commit.BlockID) { - return fmt.Errorf("invalid commit -- wrong block ID: want %v, got %v", - blockID, commit.BlockID) - } talliedVotingPower := int64(0) votingPowerNeeded := vals.TotalVotingPower() * 2 / 3