mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 06:54:41 +00:00
JSON tests related changes (#4461)
* test functions take time.Now and other minor changes * updated remaining test files * Update validation_test.go * fix typo * go fmt * import time Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
@@ -82,7 +82,7 @@ func makeValidCommit(
|
||||
sigs := make([]types.CommitSig, 0)
|
||||
for i := 0; i < vals.Size(); i++ {
|
||||
_, val := vals.GetByIndex(i)
|
||||
vote, err := types.MakeVote(height, blockID, vals, privVals[val.Address.String()], chainID)
|
||||
vote, err := types.MakeVote(height, blockID, vals, privVals[val.Address.String()], chainID, time.Now())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ func TestValidateBlockCommit(t *testing.T) {
|
||||
state.Validators,
|
||||
privVals[proposerAddr.String()],
|
||||
chainID,
|
||||
time.Now(),
|
||||
)
|
||||
require.NoError(t, err, "height %d", height)
|
||||
wrongHeightCommit := types.NewCommit(
|
||||
@@ -162,7 +163,13 @@ func TestValidateBlockCommit(t *testing.T) {
|
||||
/*
|
||||
wrongSigsCommit is fine except for the extra bad precommit
|
||||
*/
|
||||
goodVote, err := types.MakeVote(height, blockID, state.Validators, privVals[proposerAddr.String()], chainID)
|
||||
goodVote, err := types.MakeVote(height,
|
||||
blockID,
|
||||
state.Validators,
|
||||
privVals[proposerAddr.String()],
|
||||
chainID,
|
||||
time.Now(),
|
||||
)
|
||||
require.NoError(t, err, "height %d", height)
|
||||
badVote := &types.Vote{
|
||||
ValidatorAddress: badPrivVal.GetPubKey().Address(),
|
||||
|
||||
Reference in New Issue
Block a user