Documentation ¶
Index ¶
- Constants
- func AddCommands(ctx *config.ServerContext, cdc *codec.Codec, rootCmd *cobra.Command, ...)
- func ExportCmd(ctx *config.ServerContext, cdc *codec.Codec, appExporter AppExporter) *cobra.Command
- func ExternalIP() (string, error)
- func FreeTCPAddr() (addr, port string, err error)
- func GenerateCoinKey() (sdk.AccAddress, string, error)
- func GenerateSaveCoinKey(clientRoot, keyName, keyPass string, overwrite bool) (sdk.AccAddress, string, error)
- func InsertKeyJSON(cdc *codec.Codec, baseJSON []byte, key string, value json.RawMessage) ([]byte, error)
- func PersistentPreRunEFn(context *config.ScloudContext) func(*cobra.Command, []string) error
- func SetupViper(t *testing.T) func()
- func ShowAddressCmd(ctx *config.ServerContext) *cobra.Command
- func ShowNodeIDCmd(ctx *config.ServerContext) *cobra.Command
- func ShowValidatorCmd(ctx *config.ServerContext) *cobra.Command
- func StartCmd(ctx *config.ServerContext, appCreator AppCreator) *cobra.Command
- func TrapSignal(cleanupFunc func())
- func UnsafeResetAllCmd(ctx *config.ServerContext) *cobra.Command
- func UpgradeOldPrivValFile(config *cfg.Config)
- func VersionCmd(ctx *config.ServerContext) *cobra.Command
- type AppCreator
- type AppExporter
Constants ¶
const ( FlagMinGasPrices = "minimum-gas-prices" FlagHaltHeight = "halt-height" )
Tendermint full-node start flags
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands( ctx *config.ServerContext, cdc *codec.Codec, rootCmd *cobra.Command, appCreator AppCreator, appExport AppExporter)
add server commands
func ExportCmd ¶
func ExportCmd(ctx *config.ServerContext, cdc *codec.Codec, appExporter AppExporter) *cobra.Command
ExportCmd dumps app state to JSON.
func ExternalIP ¶
https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go TODO there must be a better way to get external IP
func FreeTCPAddr ¶
Get a free address for a test tendermint server protocol is either tcp, http, etc
func GenerateCoinKey ¶
func GenerateCoinKey() (sdk.AccAddress, string, error)
GenerateCoinKey returns the address of a public key, along with the secret phrase to recover the private key.
func GenerateSaveCoinKey ¶
func GenerateSaveCoinKey(clientRoot, keyName, keyPass string, overwrite bool) (sdk.AccAddress, string, error)
GenerateSaveCoinKey returns the address of a public key, along with the secret phrase to recover the private key.
func InsertKeyJSON ¶
func InsertKeyJSON(cdc *codec.Codec, baseJSON []byte, key string, value json.RawMessage) ([]byte, error)
InsertKeyJSON inserts a new JSON field/key with a given value to an existing JSON message. An error is returned if any serialization operation fails.
NOTE: The ordering of the keys returned as the resulting JSON message is non-deterministic, so the client should not rely on key ordering.
func PersistentPreRunEFn ¶
PersistentPreRunEFn returns a PersistentPreRunE function for cobra that initailizes the passed in context with a properly configured logger and config object.
func SetupViper ¶
SetupViper creates a homedir to run inside, and returns a cleanup function to defer
func ShowAddressCmd ¶
func ShowAddressCmd(ctx *config.ServerContext) *cobra.Command
ShowAddressCmd - show this node's validator address
func ShowNodeIDCmd ¶
func ShowNodeIDCmd(ctx *config.ServerContext) *cobra.Command
ShowNodeIDCmd - ported from Tendermint, dump node ID to stdout
func ShowValidatorCmd ¶
func ShowValidatorCmd(ctx *config.ServerContext) *cobra.Command
ShowValidator - ported from Tendermint, show this node's validator info
func StartCmd ¶
func StartCmd(ctx *config.ServerContext, appCreator AppCreator) *cobra.Command
StartCmd runs the service passed in, either stand-alone or in-process with Tendermint.
func TrapSignal ¶
func TrapSignal(cleanupFunc func())
TrapSignal traps SIGINT and SIGTERM and terminates the server correctly.
func UnsafeResetAllCmd ¶
func UnsafeResetAllCmd(ctx *config.ServerContext) *cobra.Command
UnsafeResetAllCmd - extension of the tendermint command, resets initialization
func UpgradeOldPrivValFile ¶
UpgradeOldPrivValFile converts old priv_validator.json file (prior to Tendermint 0.28) to the new priv_validator_key.json and priv_validator_state.json files.
func VersionCmd ¶
func VersionCmd(ctx *config.ServerContext) *cobra.Command
VersionCmd prints tendermint and ABCI version numbers.
Types ¶
type AppCreator ¶
AppCreator is a function that allows us to lazily initialize an application using various configurations.