server

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: Apache-2.0 Imports: 25 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 GetBlockCmd added in v0.11.2

func GetBlockCmd(logger log.Logger, home string, args []string) error

GetBlockCmd extracts a block from a blockstore.db and outputs as json It takes the last block unless -height is explicitly specified It writes the json to stdout

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 RetryCmd added in v0.11.2

func RetryCmd(makeApp InlineAppGenerator, logger log.Logger, home string, args []string) error

RetryCmd takes the app state and the last block from the file system It verifies that they match, then rolls back one block and re-runs the given block It will output the new hash after running.

If -error is passed, then it will try -max times until a different app hash results

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(*Options) (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.

type InlineAppGenerator added in v0.11.2

type InlineAppGenerator func(weave.CommitKVStore, log.Logger, bool) abci.Application

InlineAppGenerator should be implemented by the app/init.go file

type Options added in v0.14.0

type Options struct {
	MinFee coin.Coin
	Debug  bool
	Home   string
	Logger log.Logger
}

Jump to

Keyboard shortcuts

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