types: simplify VerifyCommitTrusting

Closes #4783 

It looks like we're validating Commit twice. Also, height and blockID params were coming from the commit, so no need to pass them separately.
This commit is contained in:
Anton Kaliaev
2020-05-07 13:24:31 +04:00
committed by GitHub
parent 8b2ed8933a
commit d202fab478
6 changed files with 22 additions and 40 deletions

View File

@@ -509,8 +509,6 @@ func (ev ConflictingHeadersEvidence) VerifyComposite(committedHeader *Header, va
// trusted validator set.
if err := valSet.VerifyCommitTrusting(
alternativeHeader.ChainID,
alternativeHeader.Commit.BlockID,
alternativeHeader.Height,
alternativeHeader.Commit,
tmmath.Fraction{Numerator: 1, Denominator: 3}); err != nil {
return errors.Wrap(err, "alt header does not have 1/3+ of voting power of our validator set")