evidence: store tests and fixes

This commit is contained in:
Ethan Buchman
2017-11-20 03:55:59 +00:00
parent c2585b5525
commit c13e93d63e
3 changed files with 212 additions and 22 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt"
"github.com/tendermint/go-crypto"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/tmlibs/merkle"
)
@ -78,6 +79,17 @@ func (evl EvidenceList) Has(evidence Evidence) bool {
//-------------------------------------------
const (
evidenceTypeDuplicateVote = byte(0x01)
)
var _ = wire.RegisterInterface(
struct{ Evidence }{},
wire.ConcreteType{&DuplicateVoteEvidence{}, evidenceTypeDuplicateVote},
)
//-------------------------------------------
// DuplicateVoteEvidence contains evidence a validator signed two conflicting votes.
type DuplicateVoteEvidence struct {
PubKey crypto.PubKey