diff options
author | Meng-Ying Yang <garfield@dexon.org> | 2018-12-29 20:56:27 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:20 +0800 |
commit | 90ae869a1a8609bc0cec53b2ce9fd52cea40d7af (patch) | |
tree | 6c76f2baaf7f7c5a45fc5ce6fa6bdf45c90d73af /indexer | |
parent | dca9e3e2521648b6632062429e4e3deabf5b54f3 (diff) | |
download | go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar.gz go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar.bz2 go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar.lz go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar.xz go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.tar.zst go-tangerine-90ae869a1a8609bc0cec53b2ce9fd52cea40d7af.zip |
indexer: ReadOnlyBlockChain returns related configs (#110)
For restoring mock componenets (such as: VM, Backend, ...etc),
blockchain related configs should be exposed.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/blockchain.go (renamed from indexer/blockhain.go) | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indexer/blockhain.go b/indexer/blockchain.go index bf9a180ce..a762ef67d 100644 --- a/indexer/blockhain.go +++ b/indexer/blockchain.go @@ -10,7 +10,9 @@ import ( "github.com/dexon-foundation/dexon/core" "github.com/dexon-foundation/dexon/core/state" "github.com/dexon-foundation/dexon/core/types" + "github.com/dexon-foundation/dexon/core/vm" "github.com/dexon-foundation/dexon/event" + "github.com/dexon-foundation/dexon/params" "github.com/dexon-foundation/dexon/rlp" ) @@ -18,6 +20,7 @@ import ( // methods of core.BlockChain struct. type ReadOnlyBlockChain interface { BadBlocks() []*types.Block + Config() *params.ChainConfig CurrentBlock() *types.Block CurrentFastBlock() *types.Block CurrentHeader() *types.Header @@ -54,6 +57,7 @@ type ReadOnlyBlockChain interface { GetTd(common.Hash, uint64) *big.Int GetTdByHash(common.Hash) *big.Int GetUnclesInChain(*types.Block, int) []*types.Header + GetVMConfig() *vm.Config HasBlock(common.Hash, uint64) bool HasBlockAndState(common.Hash, uint64) bool HasHeader(common.Hash, uint64) bool |