Documentation ¶
Index ¶
- Constants
- func GetBlockCmd(args []string) error
- func InitCmd(gen GenOptions, logger log.Logger, home string, args []string) error
- func RetryCmd(makeApp InlineAppGenerator, logger log.Logger, home string, args []string) error
- func StartCmd(gen AppGenerator, logger log.Logger, home string, args []string) error
- type AppGenerator
- type GenOptions
- type GenesisDoc
- type InlineAppGenerator
- type Options
Constants ¶
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
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 ¶
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
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
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