evidence: enforce ordering in DuplicateVoteEvidence (#4151)

Fixes #4143
This commit is contained in:
Aditya
2019-11-19 01:54:54 -05:00
committed by Anton Kaliaev
parent 45c24ff8ea
commit 8a878c1cad
5 changed files with 39 additions and 16 deletions

View File

@@ -504,11 +504,7 @@ func newEvidence(
vote2_.Signature, err = val.Key.PrivKey.Sign(vote2_.SignBytes(chainID))
require.NoError(t, err)
return types.DuplicateVoteEvidence{
PubKey: val.Key.PubKey,
VoteA: vote,
VoteB: vote2_,
}
return *types.NewDuplicateVoteEvidence(val.Key.PubKey, vote, vote2_)
}
func makeEvidences(