mirror of
https://github.com/tendermint/tendermint.git
synced 2026-06-03 04:46:27 +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:
@@ -209,7 +209,7 @@ func newMockEvidencePool(val []byte) *mockEvidencePool {
|
||||
}
|
||||
|
||||
// NOTE: maxBytes is ignored
|
||||
func (m *mockEvidencePool) PendingEvidence(maxBytes int64) []types.Evidence {
|
||||
func (m *mockEvidencePool) PendingEvidence(maxBytes uint32) []types.Evidence {
|
||||
if m.height > 0 {
|
||||
return m.ev
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ type emptyEvidencePool struct{}
|
||||
|
||||
var _ sm.EvidencePool = emptyEvidencePool{}
|
||||
|
||||
func (emptyEvidencePool) PendingEvidence(int64) []types.Evidence { return nil }
|
||||
func (emptyEvidencePool) AddEvidence(types.Evidence) error { return nil }
|
||||
func (emptyEvidencePool) Update(*types.Block, sm.State) {}
|
||||
func (emptyEvidencePool) IsCommitted(types.Evidence) bool { return false }
|
||||
func (emptyEvidencePool) IsPending(types.Evidence) bool { return false }
|
||||
func (emptyEvidencePool) PendingEvidence(uint32) []types.Evidence { return nil }
|
||||
func (emptyEvidencePool) AddEvidence(types.Evidence) error { return nil }
|
||||
func (emptyEvidencePool) Update(*types.Block, sm.State) {}
|
||||
func (emptyEvidencePool) IsCommitted(types.Evidence) bool { return false }
|
||||
func (emptyEvidencePool) IsPending(types.Evidence) bool { return false }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// mockProxyApp uses ABCIResponses to give the right results.
|
||||
|
||||
Reference in New Issue
Block a user