Skip to content

Commit

Permalink
testutil: add nil reasons to random prevote
Browse files Browse the repository at this point in the history
  • Loading branch information
jazg committed Oct 22, 2019
1 parent a8c8fe2 commit f2df06b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion testutil/process.go
Expand Up @@ -107,7 +107,11 @@ func RandomPrevote() *process.Prevote {
height := block.Height(rand.Int63())
round := block.Round(rand.Int63())
hash := RandomHash()
return process.NewPrevote(height, round, hash, nil)
nilReasons := make(process.NilReasons)
nilReasons["key1"] = []byte("val1")
nilReasons["key2"] = []byte("val2")
nilReasons["key3"] = []byte("val3")
return process.NewPrevote(height, round, hash, nilReasons)
}

func RandomPrecommit() *process.Precommit {
Expand Down

0 comments on commit f2df06b

Please sign in to comment.