diff options
author | Meng-Ying Yang <garfield@dexon.org> | 2019-01-09 15:21:41 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | db340dd2b99059904d63673d75feb318a269d8b9 (patch) | |
tree | e8a22eee9e3c69bc0250b6731732d36957882914 /cmd | |
parent | d82594250e47a32869d0b55b9da13c80e1703026 (diff) | |
download | dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.gz dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.zst dexon-db340dd2b99059904d63673d75feb318a269d8b9.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 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. |