aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorMeng-Ying Yang <garfield@dexon.org>2019-01-09 15:21:41 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:50:01 +0800
commit8fa7b78f2593fe176bfb3a0b1d810036decf91e9 (patch)
treec016940c364c103a29a1bb4de12f5e4dc57cf9f9 /cmd
parent6ef98fe1f1dc5bc2117e8257760cefaa0797b1ff (diff)
downloaddexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar.gz
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar.bz2
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar.lz
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar.xz
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.tar.zst
dexon-8fa7b78f2593fe176bfb3a0b1d810036decf91e9.zip
indexer: pass network-related params through config (#133)
Pass following network related params: * Genesis block * Network ID And sync mode for indexer configuration.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/flags.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 1f1db9fc3..bfe565c30 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -1311,6 +1311,10 @@ func setIndexerConfig(ctx *cli.Context, cfg *dex.Config) {
cfg.Indexer.Plugin = ctx.GlobalString(IndexerPluginFlag.Name)
cfg.Indexer.PluginFlags = ctx.GlobalString(IndexerPluginFlagsFlag.Name)
+ // copy required dex configs
+ cfg.Indexer.Genesis = cfg.Genesis
+ cfg.Indexer.NetworkID = cfg.NetworkId
+ cfg.Indexer.SyncMode = cfg.SyncMode
}
// SetDashboardConfig applies dashboard related command line flags to the config.