You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
366 B

package testutil
import (
"github.com/tendermint/go-crypto"
"github.com/tendermint/tmsp/types"
)
//----------------------------------------
// UTILITY
func Validator(secret string, power uint64) *types.Validator {
privKey := crypto.GenPrivKeyEd25519FromSecret([]byte(secret))
return &types.Validator{
PubKey: privKey.PubKey().Bytes(),
Power: power,
}
}