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:
Shivani Joshi
2020-02-28 03:57:00 -05:00
committed by GitHub
parent 3f883bb80a
commit 78144306dd
11 changed files with 52 additions and 38 deletions

View File

@@ -54,7 +54,7 @@ func TestByzantine(t *testing.T) {
if i == 0 {
// NOTE: Now, test validators are MockPV, which by default doesn't
// do any safety checks.
css[i].privValidator.(*types.MockPV).DisableChecks()
css[i].privValidator.(types.MockPV).DisableChecks()
css[i].decideProposal = func(j int) func(int64, int) {
return func(height int64, round int) {
byzantineDecideProposalFunc(t, height, round, css[j], switches[j])

View File

@@ -892,7 +892,8 @@ func makeBlock(state sm.State, lastBlock *types.Block, lastBlockMeta *types.Bloc
lastBlockMeta.BlockID,
state.Validators,
privVal,
lastBlock.Header.ChainID)
lastBlock.Header.ChainID,
time.Now())
lastCommit = types.NewCommit(vote.Height, vote.Round,
lastBlockMeta.BlockID, []types.CommitSig{vote.CommitSig()})
}