diff options
author | Meng-Ying Yang <garfield@dexon.org> | 2019-01-09 15:21:41 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | 76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd (patch) | |
tree | f5dd9a99a79c47270dec29e1a744cdbeb41940f5 /indexer/config.go | |
parent | 8426a6bcab1158433f743348d35dcf01016d5ac2 (diff) | |
download | go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar.gz go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar.bz2 go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar.lz go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar.xz go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.tar.zst go-tangerine-76e3cdf65fdb86c6e87e3e31c801fa5e0a4bbcfd.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/config.go')
-rw-r--r-- | indexer/config.go | 10 |
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. |