Documentation ¶
Overview ¶
Package config provides configuration for GRPC and HTTP api servers
Index ¶
Constants ¶
const Account1Private = "" /* 130-byte string literal not displayed */
Account1Private is the private key for test account
const Account1Pub = "0x7be017a967db77fd10ac7c891b3d6d946dea7e3e14756e2f0f9e09b9663f0d9c"
Account1Pub is the public key for testing
const Account2Private = "" /* 130-byte string literal not displayed */
Account2Private is the private key for secode test account
const Account2Pub = "0x22a31a84ab876f82fcafba86e77910b4419a4ee0f1d5483d7dd3b5b6b6922ee9"
Account2Pub is the public key for second test account
Variables ¶
This section is empty.
Functions ¶
func SaveGenesisConfig ¶
func SaveGenesisConfig(path string, config GenesisConfig) error
SaveGenesisConfig stores account data
Types ¶
type Config ¶
type Config struct { StartGrpcServer bool `mapstructure:"grpc-server"` StartGrpcServices []string `mapstructure:"grpc"` GrpcServerPort int `mapstructure:"grpc-port"` NewGrpcServerPort int `mapstructure:"grpc-port-new"` NewGrpcServerInterface string `mapstructure:"grpc-interface-new"` StartJSONServer bool `mapstructure:"json-server"` StartNewJSONServer bool `mapstructure:"json-server-new"` JSONServerPort int `mapstructure:"json-port"` NewJSONServerPort int `mapstructure:"json-port-new"` // no direct command line flags for these StartDebugService bool StartGatewayService bool StartGlobalStateService bool StartMeshService bool StartNodeService bool StartSmesherService bool StartTransactionService bool }
Config defines the api config params
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig defines the default configuration options for api
func (*Config) ParseServicesList ¶ added in v0.1.15
ParseServicesList enables the requested services
type GenesisAccount ¶
type GenesisAccount struct { Balance *big.Int `json:"balance" gencodec:"required"` Nonce uint64 `json:"nonce"` }
GenesisAccount is the json representation of an account
type GenesisConfig ¶
type GenesisConfig struct {
InitialAccounts map[string]GenesisAccount
}
GenesisConfig defines accounts that will exist in state at genesis
func DefaultGenesisConfig ¶
func DefaultGenesisConfig() *GenesisConfig
DefaultGenesisConfig is the default configuration for the node
func LoadGenesisConfig ¶
func LoadGenesisConfig(path string) (*GenesisConfig, error)
LoadGenesisConfig loads config from file if exists