From 76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd Mon Sep 17 00:00:00 2001 From: Meng-Ying Yang Date: Wed, 9 Jan 2019 15:21:41 +0800 Subject: indexer: pass network-related params through config (#133) Pass following network related params: * Genesis block * Network ID And sync mode for indexer configuration. --- cmd/utils/flags.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/utils/flags.go') 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. -- cgit v1.2.3