mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 19:53:58 +00:00
evidence: structs can independently form abci evidence (#5610)
This commit is contained in:
@@ -265,10 +265,15 @@ func TestCreateProposalBlock(t *testing.T) {
|
||||
for currentBytes <= maxEvidenceBytes {
|
||||
ev := types.NewMockDuplicateVoteEvidenceWithValidator(height, time.Now(), privVals[0], "test-chain")
|
||||
currentBytes += int64(len(ev.Bytes()))
|
||||
err := evidencePool.AddEvidenceFromConsensus(ev, time.Now(), state.Validators)
|
||||
err := evidencePool.AddEvidenceFromConsensus(ev)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
evList, size := evidencePool.PendingEvidence(state.ConsensusParams.Evidence.MaxBytes)
|
||||
require.Less(t, size, state.ConsensusParams.Evidence.MaxBytes+1)
|
||||
evData := &types.EvidenceData{Evidence: evList}
|
||||
require.EqualValues(t, size, evData.ByteSize())
|
||||
|
||||
// fill the mempool with more txs
|
||||
// than can fit in a block
|
||||
txLength := 100
|
||||
|
||||
Reference in New Issue
Block a user