Documentation
¶
Index ¶
- func ExportConfig(cfg *Config, fp string) *os.File
- func InitNode(cfg *Config) error
- func LoadConfig(cfg *Config, fp string) error
- func NetworkServiceEnabled(cfg *Config) bool
- func NewTestGenesis(t *testing.T) *genesis.Genesis
- func NewTestGenesisAndRuntime(t *testing.T) string
- func NewTestGenesisFile(t *testing.T, cfg *Config) *os.File
- func NodeInitialized(basepath string, expected bool) bool
- func RPCServiceEnabled(cfg *Config) bool
- type AccountConfig
- type Config
- type CoreConfig
- type GlobalConfig
- type InitConfig
- type NetworkConfig
- type Node
- type RPCConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportConfig ¶
ExportConfig exports a dot configuration to a toml configuration file
func InitNode ¶
InitNode initializes a new dot node from the provided dot node configuration and JSON formatted genesis file.
func LoadConfig ¶
LoadConfig loads the values from the toml configuration file into the provided configuration
func NetworkServiceEnabled ¶
NetworkServiceEnabled returns true if the network service is enabled
func NewTestGenesis ¶
NewTestGenesis returns a test genesis instance using "gssmr" raw data
func NewTestGenesisAndRuntime ¶
NewTestGenesisAndRuntime create a new test runtime and a new test genesis file with the test runtime stored in raw data and returns the genesis file nolint
func NewTestGenesisFile ¶
NewTestGenesisFile returns a test genesis file using "gssmr" raw data
func NodeInitialized ¶
NodeInitialized returns true if, within the configured data directory for the node, the state database has been created and the genesis data has been loaded
func RPCServiceEnabled ¶
RPCServiceEnabled returns true if the rpc service is enabled
Types ¶
type AccountConfig ¶
AccountConfig is to marshal/unmarshal account config vars
type Config ¶
type Config struct {
Global GlobalConfig `toml:"global"`
Init InitConfig `toml:"init"`
Account AccountConfig `toml:"account"`
Core CoreConfig `toml:"core"`
Network NetworkConfig `toml:"network"`
RPC RPCConfig `toml:"rpc"`
System types.SystemInfo `toml:"-"`
}
Config is a collection of configurations throughout the system
func GssmrConfig ¶
func GssmrConfig() *Config
GssmrConfig returns a new test configuration using the provided basepath
func NewTestConfig ¶
NewTestConfig returns a new test configuration using the provided basepath
func NewTestConfigWithFile ¶
NewTestConfigWithFile returns a new test configuration and a temporary configuration file
type CoreConfig ¶
CoreConfig is to marshal/unmarshal toml core config vars
type GlobalConfig ¶
type GlobalConfig struct {
Name string `toml:"name"`
ID string `toml:"id"`
BasePath string `toml:"basepath"`
}
GlobalConfig is to marshal/unmarshal toml global config vars
type InitConfig ¶
type InitConfig struct {
Genesis string `toml:"genesis"`
}
InitConfig is the configuration for the node initialization
type NetworkConfig ¶
type NetworkConfig struct {
Port uint32 `toml:"port"`
Bootnodes []string `toml:"bootnodes"`
ProtocolID string `toml:"protocol"`
NoBootstrap bool `toml:"nobootstrap"`
NoMDNS bool `toml:"nomdns"`
}
NetworkConfig is to marshal/unmarshal toml network config vars