aboutsummaryrefslogtreecommitdiffstats
path: root/indexer
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-03-12 12:19:09 +0800
commit1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8 (patch)
treeb3ccc2df3e0c87a38d489558e82299a3be03777d /indexer
parentb1dc0bc7a87927c5a60f1b640789e1d9217355ef (diff)
downloaddexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar
dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.gz
dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.bz2
dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.lz
dexon-1fa4923dd3b9d4e9eb149e9cc1f419b657711fe8.tar.xz
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 'indexer')
-rw-r--r--indexer/config.go10
1 files changed, 10 insertions, 0 deletions
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.