server

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppStateKey is the key in the json json where all info
	// on initializing the app can be found
	AppStateKey             = "app_state"
	DirConfig               = "config"
	GenesisTimeKey          = "genesis_time"
	ErrorAlreadyInitialised = "the application has already been initialised, use %s flag to override or %s to ignore"
	FlagForce               = "f"
	FlagIgnore              = "i"
)

Variables

This section is empty.

Functions

func InitCmd

func InitCmd(gen GenOptions, logger log.Logger, home string, args []string) error

InitCmd will initialize all files for tendermint, along with proper app_options. The application can pass in a function to generate proper options. And may want to use GenerateCoinKey to create default account(s).

func StartCmd

func StartCmd(gen AppGenerator, logger log.Logger, home string, args []string) error

StartCmd initializes the application, and

Types

type AppGenerator

type AppGenerator func(string, log.Logger, bool) (abci.Application, error)

AppGenerator lets us lazily initialize app, using home dir and logger potentially initialized with other flags

type GenOptions

type GenOptions func(args []string) (json.RawMessage, error)

GenOptions can parse command-line and flag to generate default app_options for the genesis file. This is application-specific

type GenesisDoc added in v0.2.0

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