mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +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:
@@ -98,9 +98,7 @@ func (blockExec *BlockExecutor) CreateProposalBlock(
|
||||
maxBytes := state.ConsensusParams.Block.MaxBytes
|
||||
maxGas := state.ConsensusParams.Block.MaxGas
|
||||
|
||||
// Fetch a limited amount of valid evidence
|
||||
maxNumEvidence, _ := types.MaxEvidencePerBlock(maxBytes)
|
||||
evidence := blockExec.evpool.PendingEvidence(maxNumEvidence)
|
||||
evidence := blockExec.evpool.PendingEvidence(state.ConsensusParams.Evidence.MaxNum)
|
||||
|
||||
// Fetch a limited amount of valid txs
|
||||
maxDataBytes := types.MaxDataBytes(maxBytes, state.Validators.Size(), len(evidence))
|
||||
|
||||
Reference in New Issue
Block a user