updated CONFIG.GO

This commit is contained in:
AnilChinchawale 2018-05-22 13:14:28 +05:30
parent 7ac52b7950
commit a8477a1d57

View file

@ -70,7 +70,7 @@ const (
SWARM_ENV_ENS_ADDR = "SWARM_ENS_ADDR"
SWARM_ENV_CORS = "SWARM_CORS"
SWARM_ENV_BOOTNODES = "SWARM_BOOTNODES"
GETH_ENV_DATADIR = "GETH_DATADIR"
XDC_ENV_DATADIR = "XDC_DATADIR"
)
// These settings ensure that TOML keys use the same names as Go struct fields.
@ -116,7 +116,7 @@ func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) {
//at this point, all vars should be set in the Config
//get the account for the provided swarm account
prvkey := getAccount(config.BzzAccount, ctx, stack)
//set the resolved config path (geth --datadir)
//set the resolved config path (XDC --datadir)
config.Path = stack.InstanceDir()
//finally, initialize the configuration
config.Init(prvkey)
@ -243,7 +243,7 @@ func envVarsOverride(currentConfig *bzzapi.Config) (config *bzzapi.Config) {
}
}
if datadir := os.Getenv(GETH_ENV_DATADIR); datadir != "" {
if datadir := os.Getenv(XDC_ENV_DATADIR); datadir != "" {
currentConfig.Path = datadir
}