mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 11:11:41 +00:00
Bucky/fix evidence halt (#34)
* consensus: createProposalBlock function * blockExecutor.CreateProposalBlock - factored out of consensus pkg into a method on blockExec - new private interfaces for mempool ("txNotifier") and evpool with one function each - consensus tests still require more mempool methods * failing test for CreateProposalBlock * Fix bug in include evidece into block * evidence: change maxBytes to maxSize * MaxEvidencePerBlock - changed to return both the max number and the max bytes - preparation for #2590 * changelog * fix linter * Fix from review Co-Authored-By: ebuchman <ethan@coinculture.info>
This commit is contained in:
@ -109,10 +109,9 @@ func TestValidateBlockEvidence(t *testing.T) {
|
||||
|
||||
// A block with too much evidence fails.
|
||||
maxBlockSize := state.ConsensusParams.BlockSize.MaxBytes
|
||||
maxEvidenceBytes := types.MaxEvidenceBytesPerBlock(maxBlockSize)
|
||||
maxEvidence := maxEvidenceBytes / types.MaxEvidenceBytes
|
||||
require.True(t, maxEvidence > 2)
|
||||
for i := int64(0); i < maxEvidence; i++ {
|
||||
maxNumEvidence, _ := types.MaxEvidencePerBlock(maxBlockSize)
|
||||
require.True(t, maxNumEvidence > 2)
|
||||
for i := int64(0); i < maxNumEvidence; i++ {
|
||||
block.Evidence.Evidence = append(block.Evidence.Evidence, goodEvidence)
|
||||
}
|
||||
block.EvidenceHash = block.Evidence.Hash()
|
||||
|
Reference in New Issue
Block a user