All units tests passing

This commit is contained in:
Sergio Mena
2022-11-30 21:19:14 +01:00
parent c3cb29c67b
commit 2aff9782a7
10 changed files with 120 additions and 152 deletions
-2
View File
@@ -179,13 +179,11 @@ func TestFinalizeBlockValidators(t *testing.T) {
[]byte("Signature1"),
state.Validators.Validators[0].Address,
now,
types.VoteExtensionToSign{},
)
commitSig1 = types.NewCommitSigForBlock(
[]byte("Signature2"),
state.Validators.Validators[1].Address,
now,
types.VoteExtensionToSign{},
)
absentSig = types.NewCommitSigAbsent()
)
+1 -2
View File
@@ -89,14 +89,13 @@ func makeValidCommit(
vals *types.ValidatorSet,
privVals map[string]types.PrivValidator,
) (*types.Commit, []*types.Vote, error) {
t.Helper()
sigs := make([]types.CommitSig, vals.Size())
votes := make([]*types.Vote, vals.Size())
for i := 0; i < vals.Size(); i++ {
_, val := vals.GetByIndex(int32(i))
vote, err := types.MakeVote(height, blockID, vals, privVals[val.Address.String()], chainID, time.Now())
if err != nil {
return nil, err
return nil, nil, err
}
sigs[i] = vote.CommitSig()
votes[i] = vote