mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-15 19:56:11 +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:
+2
-2
@@ -253,8 +253,8 @@ func MaxDataBytes(maxBytes int64, valsCount, evidenceCount int) int64 {
|
||||
// of evidence.
|
||||
//
|
||||
// XXX: Panics on negative result.
|
||||
func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int) int64 {
|
||||
_, maxEvidenceBytes := MaxEvidencePerBlock(maxBytes)
|
||||
func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int, maxNumEvidence uint32) int64 {
|
||||
maxEvidenceBytes := int64(maxNumEvidence) * MaxEvidenceBytes
|
||||
maxDataBytes := maxBytes -
|
||||
MaxAminoOverheadForBlock -
|
||||
MaxHeaderBytes -
|
||||
|
||||
Reference in New Issue
Block a user