mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
evidence: modularise evidence by moving verification function into evidence package (#5234)
This commit is contained in:
@@ -35,7 +35,7 @@ type BlockStore interface {
|
||||
//-----------------------------------------------------------------------------
|
||||
// evidence pool
|
||||
|
||||
//go:generate mockery -case underscore -name EvidencePool
|
||||
//go:generate mockery --case underscore --name EvidencePool
|
||||
|
||||
// EvidencePool defines the EvidencePool interface used by the ConsensusState.
|
||||
// Get/Set/Commit
|
||||
@@ -43,9 +43,7 @@ type EvidencePool interface {
|
||||
PendingEvidence(uint32) []types.Evidence
|
||||
AddEvidence(types.Evidence) error
|
||||
Update(*types.Block, State)
|
||||
IsCommitted(types.Evidence) bool
|
||||
IsPending(types.Evidence) bool
|
||||
Header(int64) *types.Header
|
||||
Verify(types.Evidence) error
|
||||
}
|
||||
|
||||
// MockEvidencePool is an empty implementation of EvidencePool, useful for testing.
|
||||
@@ -54,6 +52,4 @@ type MockEvidencePool struct{}
|
||||
func (me MockEvidencePool) PendingEvidence(uint32) []types.Evidence { return nil }
|
||||
func (me MockEvidencePool) AddEvidence(types.Evidence) error { return nil }
|
||||
func (me MockEvidencePool) Update(*types.Block, State) {}
|
||||
func (me MockEvidencePool) IsCommitted(types.Evidence) bool { return false }
|
||||
func (me MockEvidencePool) IsPending(types.Evidence) bool { return false }
|
||||
func (me MockEvidencePool) Header(int64) *types.Header { return nil }
|
||||
func (me MockEvidencePool) Verify(types.Evidence) error { return nil }
|
||||
|
||||
Reference in New Issue
Block a user