mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
evidence: cap evidence to an absolute number (#4780)
The number of evidence that can be committed in a single block is capped by a new evidence parameter called MaxNum
This commit is contained in:
@@ -40,17 +40,18 @@ type BlockStore interface {
|
||||
// EvidencePool defines the EvidencePool interface used by the ConsensusState.
|
||||
// Get/Set/Commit
|
||||
type EvidencePool interface {
|
||||
PendingEvidence(int64) []types.Evidence
|
||||
PendingEvidence(uint32) []types.Evidence
|
||||
AddEvidence(types.Evidence) error
|
||||
Update(*types.Block, State)
|
||||
IsCommitted(types.Evidence) bool
|
||||
IsPending(types.Evidence) bool
|
||||
}
|
||||
|
||||
// MockEvidencePool is an empty implementation of EvidencePool, useful for testing.
|
||||
type MockEvidencePool struct{}
|
||||
|
||||
func (me MockEvidencePool) PendingEvidence(int64) []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) 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 }
|
||||
|
||||
Reference in New Issue
Block a user