updated CONFIG.GO

This commit is contained in:
AnilChinchawale 2018-05-24 14:54:31 +05:30
parent 821f8915a1
commit f1abd2fdea

View file

@ -74,7 +74,7 @@ type ethstatsConfig struct {
URL string `toml:",omitempty"`
}
type gethConfig struct {
type XDCConfig struct {
Eth eth.Config
Shh whisper.Config
Node node.Config
@ -82,7 +82,7 @@ type gethConfig struct {
Dashboard dashboard.Config
}
func loadConfig(file string, cfg *gethConfig) error {
func loadConfig(file string, cfg *XDCConfig) error {
f, err := os.Open(file)
if err != nil {
return err
@ -103,13 +103,13 @@ func defaultNodeConfig() node.Config {
cfg.Version = params.VersionWithCommit(gitCommit)
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
cfg.WSModules = append(cfg.WSModules, "eth", "shh")
cfg.IPCPath = "geth.ipc"
cfg.IPCPath = "XDC.ipc"
return cfg
}
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
// Load defaults.
cfg := gethConfig{
cfg := XDCConfig{
Eth: eth.DefaultConfig,
Shh: whisper.DefaultConfig,
Node: defaultNodeConfig(),