mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-26 07:12:16 +00:00
18 lines
366 B
Go
18 lines
366 B
Go
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,
|
|
}
|
|
}
|