aboutsummaryrefslogtreecommitdiffstats
path: root/indexer
diff options
context:
space:
mode:
authorMeng-Ying Yang <garfield@dexon.org>2019-01-02 16:32:43 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:20 +0800
commit699d1c7f48d975d042f01659f4772b2153d36882 (patch)
treec1527e06493b4e67414b98bd7cbb2b1dfb1fac6a /indexer
parent12876a86ac3dadd89831c2b02bf9be6fced9e24b (diff)
downloadgo-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar.gz
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar.bz2
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar.lz
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar.xz
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.tar.zst
go-tangerine-699d1c7f48d975d042f01659f4772b2153d36882.zip
Indexer plugin extension and custom flags support (#117)
* indexer: ReadOnlyBlockchain returns underlying engine * indexer: plugin configs support custom flags
Diffstat (limited to 'indexer')
-rw-r--r--indexer/blockchain.go2
-rw-r--r--indexer/config.go3
2 files changed, 5 insertions, 0 deletions
diff --git a/indexer/blockchain.go b/indexer/blockchain.go
index a762ef67d..421535184 100644
--- a/indexer/blockchain.go
+++ b/indexer/blockchain.go
@@ -7,6 +7,7 @@ import (
coreTypes "github.com/dexon-foundation/dexon-consensus/core/types"
"github.com/dexon-foundation/dexon/common"
+ "github.com/dexon-foundation/dexon/consensus"
"github.com/dexon-foundation/dexon/core"
"github.com/dexon-foundation/dexon/core/state"
"github.com/dexon-foundation/dexon/core/types"
@@ -24,6 +25,7 @@ type ReadOnlyBlockChain interface {
CurrentBlock() *types.Block
CurrentFastBlock() *types.Block
CurrentHeader() *types.Header
+ Engine() consensus.Engine
GasLimit() uint64
Genesis() *types.Block
GetAncestor(common.Hash, uint64, uint64, *uint64) (common.Hash, uint64)
diff --git a/indexer/config.go b/indexer/config.go
index 3b626272a..396a23b66 100644
--- a/indexer/config.go
+++ b/indexer/config.go
@@ -11,6 +11,9 @@ type Config struct {
// Plugin path for building components.
Plugin string
+
+ // PluginFlags for construction if needed.
+ PluginFlags string
}
// NewIndexerFromConfig initialize exporter according to given config.