From c9514f077b2ba9e697ffd00447d930794a661639 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Thu, 31 May 2018 05:24:15 +0200 Subject: [PATCH] DUPLICATE_VOTE evidence type --- types/evidence.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/evidence.go b/types/evidence.go index ee7f44a58..bbfd6c81b 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -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.