Merge pull request #1652 from tendermint/cwgoes/abci-evidence-type-constants

Constants for evidence types
This commit is contained in:
Christopher Goes
2018-05-31 05:24:47 +02:00
committed by GitHub
+6 -2
View File
@@ -9,6 +9,11 @@ import (
"github.com/tendermint/tmlibs/merkle"
)
const (
// Evidence type for duplicate vote
DUPLICATE_VOTE = "DUPLICATE_VOTE"
)
// ErrEvidenceInvalid wraps a piece of evidence and the error denoting how or why it is invalid.
type ErrEvidenceInvalid struct {
Evidence Evidence
@@ -54,8 +59,7 @@ type DuplicateVoteEvidence struct {
// String returns a string representation of the evidence.
func (dve *DuplicateVoteEvidence) String() string {
return fmt.Sprintf("VoteA: %v; VoteB: %v", dve.VoteA, dve.VoteB)
return DUPLICATE_VOTE
}
// Height returns the height this evidence refers to.