mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-28 18:55:42 +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:
@@ -92,11 +92,11 @@ func _waitForEvidence(
|
||||
reactors []*Reactor,
|
||||
) {
|
||||
evpool := reactors[reactorIdx].evpool
|
||||
for len(evpool.PendingEvidence(-1)) != len(evs) {
|
||||
for len(evpool.AllPendingEvidence()) != len(evs) {
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
}
|
||||
|
||||
reapedEv := evpool.PendingEvidence(-1)
|
||||
reapedEv := evpool.AllPendingEvidence()
|
||||
// put the reaped evidence in a map so we can quickly check we got everything
|
||||
evMap := make(map[string]types.Evidence)
|
||||
for _, e := range reapedEv {
|
||||
|
||||
Reference in New Issue
Block a user