From c74a57572515543cf24b71cd9c275921ddf24075 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 29 Apr 2016 12:02:54 +0100 Subject: [PATCH] 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. --- core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index ecf8297cbf..4598800d54 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 }