Add testutil; Clean gov return codes

This commit is contained in:
Jae Kwon
2016-03-15 11:36:05 -07:00
parent 61c34ade0d
commit 29a6d511b4
3 changed files with 86 additions and 69 deletions

17
testutil/messages.go Normal file
View File

@ -0,0 +1,17 @@
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,
}
}