evidence: remove pubkey from duplicate vote evidence

this pr brings over the removal of pubkey from duplicatevote evidence from proto-breakage

ref #4580
This commit is contained in:
Marko
2020-04-28 07:47:20 +02:00
committed by GitHub
parent fefdc6634e
commit a5a84e11f1
7 changed files with 59 additions and 33 deletions

View File

@@ -31,12 +31,12 @@ type ErrVoteConflictingVotes struct {
}
func (err *ErrVoteConflictingVotes) Error() string {
return fmt.Sprintf("conflicting votes from validator %X", err.PubKey.Address())
return fmt.Sprintf("conflicting votes from validator %X", err.VoteA.ValidatorAddress)
}
func NewConflictingVoteError(val *Validator, vote1, vote2 *Vote) *ErrVoteConflictingVotes {
return &ErrVoteConflictingVotes{
NewDuplicateVoteEvidence(val.PubKey, vote1, vote2),
NewDuplicateVoteEvidence(vote1, vote2),
}
}