evidence: remove unused param (#4726)

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
This commit is contained in:
Marko
2020-04-22 17:18:24 +02:00
committed by GitHub
parent af887adad9
commit 7a6ca0c1bf
9 changed files with 30 additions and 31 deletions
+4 -4
View File
@@ -127,10 +127,10 @@ func TestBeginBlockByzantineValidators(t *testing.T) {
prevParts := types.PartSetHeader{}
prevBlockID := types.BlockID{Hash: prevHash, PartsHeader: prevParts}
height1, idx1, val1 := int64(8), 0, state.Validators.Validators[0].Address
height2, idx2, val2 := int64(3), 1, state.Validators.Validators[1].Address
ev1 := types.NewMockEvidence(height1, time.Now(), idx1, val1)
ev2 := types.NewMockEvidence(height2, time.Now(), idx2, val2)
height1, val1 := int64(8), state.Validators.Validators[0].Address
height2, val2 := int64(3), state.Validators.Validators[1].Address
ev1 := types.NewMockEvidence(height1, time.Now(), val1)
ev2 := types.NewMockEvidence(height2, time.Now(), val2)
now := tmtime.Now()
valSet := state.Validators
+2 -3
View File
@@ -211,8 +211,7 @@ func TestValidateBlockEvidence(t *testing.T) {
for height := int64(1); height < validationTestsStopHeight; height++ {
proposerAddr := state.Validators.GetProposer().Address
proposerIdx, _ := state.Validators.GetByAddress(proposerAddr)
goodEvidence := types.NewMockEvidence(height, time.Now(), proposerIdx, proposerAddr)
goodEvidence := types.NewMockEvidence(height, time.Now(), proposerAddr)
if height > 1 {
/*
A block with too much evidence fails
@@ -265,7 +264,7 @@ func TestValidateFailBlockOnCommittedEvidence(t *testing.T) {
// A block with a couple pieces of evidence passes.
block := makeBlock(state, height)
addr, _ := state.Validators.GetByIndex(0)
alreadyCommittedEvidence := types.NewMockEvidence(height, time.Now(), 0, addr)
alreadyCommittedEvidence := types.NewMockEvidence(height, time.Now(), addr)
block.Evidence.Evidence = []types.Evidence{alreadyCommittedEvidence}
block.EvidenceHash = block.Evidence.Hash()
err := blockExec.ValidateBlock(state, block)