diff options
author | Nicholas Johnson <arachnid@notdot.net> | 2016-04-29 19:02:54 +0800 |
---|---|---|
committer | Nicholas Johnson <arachnid@notdot.net> | 2016-04-29 19:42:03 +0800 |
commit | c74a57572515543cf24b71cd9c275921ddf24075 (patch) | |
tree | 37bc9221c74d0b728e39cc1d1bc856e76ce0d4c1 /core/blockchain.go | |
parent | 0f722df2d9578c7deb15c8dba5ec70add98c34de (diff) | |
download | dexon-c74a57572515543cf24b71cd9c275921ddf24075.tar.gz dexon-c74a57572515543cf24b71cd9c275921ddf24075.tar.zst dexon-c74a57572515543cf24b71cd9c275921ddf24075.zip |
core: Provide a public accessor for ChainConfig
This is necessary for external users of the go-ethereum code who want to, for instance, build a custom node that plays back transactions, as core.ApplyTransaction requires a ChainConfig as a parameter.
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index ecf8297cb..4598800d5 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1213,3 +1213,6 @@ func (self *BlockChain) GetBlockHashesFromHash(hash common.Hash, max uint64) []c func (self *BlockChain) GetHeaderByNumber(number uint64) *types.Header { return self.hc.GetHeaderByNumber(number) } + +// Config retrieves the blockchain's chain configuration. +func (self *BlockChain) Config() *ChainConfig { return self.config } |