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. --- indexer/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indexer/config.go') diff --git a/indexer/config.go b/indexer/config.go index 396a23b66..0da9502a6 100644 --- a/indexer/config.go +++ b/indexer/config.go @@ -2,6 +2,9 @@ package indexer import ( "plugin" + + "github.com/dexon-foundation/dexon/core" + "github.com/dexon-foundation/dexon/dex/downloader" ) // Config is data sources related configs struct. @@ -14,6 +17,13 @@ type Config struct { // PluginFlags for construction if needed. PluginFlags string + + // The genesis block from dex.Config + Genesis *core.Genesis + + // Protocol options from dex.Config (partial) + NetworkID uint64 + SyncMode downloader.SyncMode } // NewIndexerFromConfig initialize exporter according to given config. -- cgit v1.2.3