Documentation ¶
Index ¶
- func AddCommands(rootCmd *cobra.Command, appState GenAppState, appCreator AppCreator, ...)
- func DefaultGenAppState(args []string, addr sdk.Address, coinDenom string) (json.RawMessage, error)
- func FreeTCPAddr(t *testing.T) string
- func GenerateCoinKey() (sdk.Address, string, error)
- func InitCmd(gen GenAppState, ctx *Context) *cobra.Command
- func PersistentPreRunEFn(context *Context) func(*cobra.Command, []string) error
- func RunOrTimeout(cmd *cobra.Command, timeout time.Duration, t *testing.T) chan error
- func ShowNodeIDCmd(ctx *Context) *cobra.Command
- func ShowValidatorCmd(ctx *Context) *cobra.Command
- func StartCmd(app AppCreator, ctx *Context) *cobra.Command
- func StartServer(t *testing.T) chan error
- func UnsafeResetAllCmd(ctx *Context) *cobra.Command
- type AppCreator
- type Context
- type GenAppState
- type GenesisDoc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands( rootCmd *cobra.Command, appState GenAppState, appCreator AppCreator, context *Context)
func DefaultGenAppState ¶
DefaultGenAppState expects two args: an account address and a coin denomination, and gives lots of coins to that address.
func FreeTCPAddr ¶
Get a free address for a test tendermint server protocol is either tcp, http, etc
func GenerateCoinKey ¶
GenerateCoinKey returns the address of a public key, along with the secret phrase to recover the private key. You can give coins to this address and return the recovery phrase to the user to access them.
func InitCmd ¶
func InitCmd(gen GenAppState, ctx *Context) *cobra.Command
InitCmd will initialize all files for tendermint, along with proper app_state. The application can pass in a function to generate proper state. And may want to use GenerateCoinKey to create default account(s).
func PersistentPreRunEFn ¶
PersistentPreRunEFn returns a PersistentPreRunE function for cobra that initailizes the passed in context with a properly configured logger and config objecy
func RunOrTimeout ¶
Run or Timout RunE of command passed in
func ShowNodeIDCmd ¶
ShowNodeIDCmd - ported from Tendermint, dump node ID to stdout
func ShowValidatorCmd ¶
ShowValidator - ported from Tendermint, show this node's validator info
func StartCmd ¶
func StartCmd(app AppCreator, ctx *Context) *cobra.Command
StartCmd runs the service passed in, either stand-alone, or in-process with tendermint
func StartServer ¶
Begin the server pass up the channel to close NOTE pass up the channel so it can be closed at the end of the process
func UnsafeResetAllCmd ¶
UnsafeResetAllCmd - extension of the tendermint command, resets initialization
Types ¶
type AppCreator ¶
AppCreator lets us lazily initialize app, using home dir and other flags (?) to start
type Context ¶
func NewDefaultContext ¶
func NewDefaultContext() *Context
type GenAppState ¶
GenAppState takes the command line args, as well as an address and coin denomination. It returns a default app_state to be included in in the genesis file. This is application-specific
type GenesisDoc ¶
type GenesisDoc map[string]json.RawMessage
GenesisDoc involves some tendermint-specific structures we don't want to parse, so we just grab it into a raw object format, so we can add one line.