mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 22:01:20 +00:00
Use gogoproto's nullable=false (#166)
* Use gogoproto's nullable=false where appropriate.
This commit is contained in:
@ -8,18 +8,18 @@ import (
|
||||
|
||||
// RandVal creates one random validator, with a key derived
|
||||
// from the input value
|
||||
func RandVal(i int) *types.Validator {
|
||||
func RandVal(i int) types.Validator {
|
||||
pubkey := crypto.GenPrivKeyEd25519FromSecret([]byte(cmn.Fmt("test%d", i))).PubKey().Bytes()
|
||||
power := cmn.RandUint16() + 1
|
||||
return &types.Validator{pubkey, int64(power)}
|
||||
return types.Validator{pubkey, int64(power)}
|
||||
}
|
||||
|
||||
// RandVals returns a list of cnt validators for initializing
|
||||
// the application. Note that the keys are deterministically
|
||||
// derived from the index in the array, while the power is
|
||||
// random (Change this if not desired)
|
||||
func RandVals(cnt int) []*types.Validator {
|
||||
res := make([]*types.Validator, cnt)
|
||||
func RandVals(cnt int) []types.Validator {
|
||||
res := make([]types.Validator, cnt)
|
||||
for i := 0; i < cnt; i++ {
|
||||
res[i] = RandVal(i)
|
||||
}
|
||||
|
Reference in New Issue
Block a user