server

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreeTCPAddr

func FreeTCPAddr(t *testing.T) string

Get a free address for a test tendermint server protocol is either tcp, http, etc

func GenerateCoinKey

func GenerateCoinKey() (sdk.Address, string, error)

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, logger log.Logger) *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 RunOrTimeout

func RunOrTimeout(cmd *cobra.Command, timeout time.Duration, t *testing.T) chan error

Run or Timout RunE of command passed in

func ShowNodeIdCmd added in v0.12.0

func ShowNodeIdCmd(logger log.Logger) *cobra.Command

ShowNodeIdCmd - ported from Tendermint, dump node ID to stdout

func ShowValidatorCmd

func ShowValidatorCmd(logger log.Logger) *cobra.Command

ShowValidator - ported from Tendermint, show this node's validator info

func StartCmd

func StartCmd(app appCreator, logger log.Logger) *cobra.Command

StartCmd runs the service passed in, either stand-alone, or in-process with tendermint

func StartServer

func StartServer(t *testing.T) chan error

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

func UnsafeResetAllCmd(logger log.Logger) *cobra.Command

UnsafeResetAllCmd - extension of the tendermint command, resets initialization

Types

type GenAppState

type GenAppState func(args []string) (json.RawMessage, string, cmn.HexBytes, error)

GenAppState can parse command-line to generate default app_state for the genesis file. Also must return generated seed and address 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL