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 /indexer | |
parent | d82594250e47a32869d0b55b9da13c80e1703026 (diff) | |
download | dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.gz dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.bz2 dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.lz dexon-db340dd2b99059904d63673d75feb318a269d8b9.tar.xz 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 'indexer')
-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. |