diff options
author | Meng-Ying Yang <garfield@dexon.org> | 2019-01-09 15:21:41 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8 (patch) | |
tree | b3ccc2df3e0c87a38d489558e82299a3be03777d /cmd | |
parent | b1dc0bc7a87927c5a60f1b640789e1d9217355ef (diff) | |
download | dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.gz dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.zst dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.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.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6f8d374b2..7f0a0e514 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1303,6 +1303,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. |