|
@ -270,7 +270,7 @@ func TestValidateBlockEvidence(t *testing.T) { |
|
|
A block with too much evidence fails |
|
|
A block with too much evidence fails |
|
|
*/ |
|
|
*/ |
|
|
evidence := make([]types.Evidence, 0) |
|
|
evidence := make([]types.Evidence, 0) |
|
|
var currentBytes int64 = 0 |
|
|
|
|
|
|
|
|
var currentBytes int64 |
|
|
// more bytes than the maximum allowed for evidence
|
|
|
// more bytes than the maximum allowed for evidence
|
|
|
for currentBytes <= maxBytesEvidence { |
|
|
for currentBytes <= maxBytesEvidence { |
|
|
newEv := types.NewMockDuplicateVoteEvidenceWithValidator(height, time.Now(), |
|
|
newEv := types.NewMockDuplicateVoteEvidenceWithValidator(height, time.Now(), |
|
@ -290,7 +290,7 @@ func TestValidateBlockEvidence(t *testing.T) { |
|
|
A good block with several pieces of good evidence passes |
|
|
A good block with several pieces of good evidence passes |
|
|
*/ |
|
|
*/ |
|
|
evidence := make([]types.Evidence, 0) |
|
|
evidence := make([]types.Evidence, 0) |
|
|
var currentBytes int64 = 0 |
|
|
|
|
|
|
|
|
var currentBytes int64 |
|
|
// precisely the amount of allowed evidence
|
|
|
// precisely the amount of allowed evidence
|
|
|
for { |
|
|
for { |
|
|
newEv := types.NewMockDuplicateVoteEvidenceWithValidator(height, defaultEvidenceTime, |
|
|
newEv := types.NewMockDuplicateVoteEvidenceWithValidator(height, defaultEvidenceTime, |
|
|