Documentation ¶
Index ¶
- func GenFilePV(keyFilePath, stateFilePath string) *privval.FilePV
- func GenerateNodeKeyFile(cdc *codec.Codec, filePath string) (*p2p.NodeKey, error)
- func GenesisFileToGenDoc(genFile string) *tmtypes.GenesisDoc
- func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage)
- func LoadFilePV(privValKeyFile, privValStateFile string) *privval.FilePV
- func LoadNodeKeyFile(cdc *codec.Codec, filePath string) (*p2p.NodeKey, error)
- func LoadOrGenFilePV(keyFilePath, stateFilePath string) *privval.FilePV
- func LoadOrGenerateNodeKeyFile(cdc *codec.Codec, filePath string) error
- func NewClient(ctx Config, appCreator AppCreator) (*node.Node, error)
- func ResetAll(dbDir, addrBookFile, privValKeyFile, privValStateFile string, ...)
- func UpgradeOldPrivValFile(config *cfg.Config)
- type AppCreator
- type Config
- type GenesisState
- type InitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenFilePV ¶
GenFilePV generates a new validator with randomly generated private key and sets the filePaths, but does not call Save().
func GenerateNodeKeyFile ¶
func GenesisFileToGenDoc ¶
func GenesisFileToGenDoc(genFile string) *tmtypes.GenesisDoc
func GenesisStateFromGenDoc ¶
func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage)
func LoadFilePV ¶
LoadFilePV loads the private validator file and generates the FilePV object
func LoadNodeKeyFile ¶
func LoadOrGenFilePV ¶
LoadOrGenFilePV loads a FilePV from the given filePaths or else generates a new one and saves it to the filePaths.
func ResetAll ¶
func ResetAll(dbDir, addrBookFile, privValKeyFile, privValStateFile string, keepAddrBook bool, logger log.Logger)
ResetAll removes address book files plus all data, and resets the privValdiator data. Exported so other CLI tools can use it.
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.
Types ¶
type AppCreator ¶
AppCreator is a function that allows us to lazily initialize an application using various configurations.
type GenesisState ¶
type GenesisState map[string]json.RawMessage
func GenesisStateFromFile ¶
func GenesisStateFromFile(cdc *codec.Codec, genFile string) GenesisState
expected usage func (app *nameServiceApp) InitChainer(ctx sdk.Ctx, req abci.RequestInitChain) abci.ResponseInitChain { genesisState := GetGensisFromFile(app.cdc, "genesis.go") return app.mm.InitGenesis(ctx, genesisState) }
type InitConfig ¶
type InitConfig struct { ChainID string GenTxsDir string Name string NodeID string ValPubKey crypto.PublicKey }
InitConfig common config options for init
func NewInitConfig ¶
func NewInitConfig(chainID, genTxsDir, name, nodeID string, valPubKey crypto.PublicKey) InitConfig
NewInitConfig creates a new InitConfig object