diff options
author | Janoš Guljaš <janos@users.noreply.github.com> | 2019-02-07 22:46:58 +0800 |
---|---|---|
committer | Rafael Matias <rafael@skyle.net> | 2019-02-19 20:11:51 +0800 |
commit | 85217b08bde168c0fd41d7265afe401454bb0f86 (patch) | |
tree | a5f8fcfeebf0f038bccd934754d4b6d57934de2f /cmd/swarm/config.go | |
parent | dcff622d43c6b7e41153d3f082e84a0718cb81c7 (diff) | |
download | dexon-85217b08bde168c0fd41d7265afe401454bb0f86.tar.gz dexon-85217b08bde168c0fd41d7265afe401454bb0f86.tar.zst dexon-85217b08bde168c0fd41d7265afe401454bb0f86.zip |
cmd/swarm/global-store: global store cmd (#19014)
(cherry picked from commit 33d0a0efa61fed2b16797fd12161519943943282)
Diffstat (limited to 'cmd/swarm/config.go')
-rw-r--r-- | cmd/swarm/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index 0203a6798..98d4dee7b 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -82,6 +82,7 @@ const ( SWARM_ENV_BOOTNODE_MODE = "SWARM_BOOTNODE_MODE" SWARM_ACCESS_PASSWORD = "SWARM_ACCESS_PASSWORD" SWARM_AUTO_DEFAULTPATH = "SWARM_AUTO_DEFAULTPATH" + SWARM_GLOBALSTORE_API = "SWARM_GLOBALSTORE_API" GETH_ENV_DATADIR = "GETH_DATADIR" ) @@ -262,6 +263,10 @@ func cmdLineOverride(currentConfig *bzzapi.Config, ctx *cli.Context) *bzzapi.Con currentConfig.BootnodeMode = ctx.GlobalBool(SwarmBootnodeModeFlag.Name) } + if ctx.GlobalIsSet(SwarmGlobalStoreAPIFlag.Name) { + currentConfig.GlobalStoreAPI = ctx.GlobalString(SwarmGlobalStoreAPIFlag.Name) + } + return currentConfig } @@ -375,6 +380,10 @@ func envVarsOverride(currentConfig *bzzapi.Config) (config *bzzapi.Config) { currentConfig.BootnodeMode = bootnodeMode } + if api := os.Getenv(SWARM_GLOBALSTORE_API); api != "" { + currentConfig.GlobalStoreAPI = api + } + return currentConfig } |