consensus

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenesisFilename            = "genesis.json"
	NodeKeyFilename            = "node_key.json"
	PrivValidatorKeyFilename   = "priv_validator_key.json"
	PrivValidatorStateFilename = "priv_validator_state.json"
	AddrBookFilename           = "addrbook.json"

	RootDirName   = "consensus"
	ConfigDirName = "config"
	DataDirName   = "data"
)

Common file names & directories

Variables

This section is empty.

Functions

func Dir

func Dir(rootDir string) string

Dir returns the root folder for consensus files

func NewNode

func NewNode(application abcitypes.Application, cfg *config.Server) (*tmnode.Node, error)

Types

type AppState

type AppState struct {
	Currencies []balance.Currency `json:"currencies"`
	States     []state            `json:"states"`
}

func (AppState) RawJSON

func (a AppState) RawJSON() ([]byte, error)

type Application

type Application = abci.Application

type Config

type Config = tmconfig.Config

type GenesisDoc

type GenesisDoc = types.GenesisDoc

func NewGenesisDoc

func NewGenesisDoc(chainID string, currencies []balance.Currency, states []StateInput) (*GenesisDoc, error)

type GenesisValidator

type GenesisValidator = types.GenesisValidator

type Node

type Node = tmnode.Node

type NodeConfig

type NodeConfig struct {
	CFG tmconfig.Config
	// contains filtered or unexported fields
}

config is used to provider the right arguments for spinning up a new consensus.Node

func ParseConfig

func ParseConfig(cfg *config.Server) (NodeConfig, error)

type StateInput

type StateInput struct {
	Address string
	Balance balance.Balance
}

Jump to

Keyboard shortcuts

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