Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFromMap ¶
BuildFromMap builds genesis fields data from map
func NewGenesisBlockFromTrie ¶
NewGenesisBlockFromTrie creates a genesis block from the provided trie
Types ¶
type Data ¶
type Data struct { Name string ID string ChainType string Bootnodes [][]byte TelemetryEndpoints []*TelemetryEndpoint ProtocolID string Properties map[string]interface{} ForkBlocks []string BadBlocks []string ConsensusEngine string CodeSubstitutes map[string]string }
Data defines the genesis file data formatted for trie storage
type Fields ¶
type Fields struct { Raw map[string]map[string]string `json:"raw,omitempty"` Runtime map[string]map[string]interface{} `json:"runtime,omitempty"` }
Fields stores genesis raw data, and human readable runtime data
type Genesis ¶
type Genesis struct { Name string `json:"name"` ID string `json:"id"` ChainType string `json:"chainType"` Bootnodes []string `json:"bootNodes"` TelemetryEndpoints []interface{} `json:"telemetryEndpoints"` ProtocolID string `json:"protocolId"` Genesis Fields `json:"genesis"` Properties map[string]interface{} `json:"properties"` ForkBlocks []string `json:"forkBlocks"` BadBlocks []string `json:"badBlocks"` ConsensusEngine string `json:"consensusEngine"` CodeSubstitutes map[string]string `json:"codeSubstitutes"` }
Genesis stores the data parsed from the genesis configuration file
func NewGenesisFromJSON ¶
NewGenesisFromJSON parses Human Readable JSON formatted genesis file.Name. If authCount > 0, then it keeps only `authCount` number of authorities for babe and grandpa.
func NewGenesisFromJSONRaw ¶
NewGenesisFromJSONRaw parses a JSON formatted genesis file
func NewGenesisSpecFromJSON ¶
NewGenesisSpecFromJSON returns a new Genesis (without raw fields) from a human-readable genesis file
func (*Genesis) GenesisData ¶
GenesisData formats genesis for trie storage
func (*Genesis) GenesisFields ¶
GenesisFields returns the genesis fields including genesis raw data
type TelemetryEndpoint ¶
TelemetryEndpoint struct to hold telemetry endpoint information