Skip to content

Commit c74a575

Browse files
committed
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.
1 parent 0f722df commit c74a575

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/blockchain.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,3 +1213,6 @@ func (self *BlockChain) GetBlockHashesFromHash(hash common.Hash, max uint64) []c
12131213
func (self *BlockChain) GetHeaderByNumber(number uint64) *types.Header {
12141214
return self.hc.GetHeaderByNumber(number)
12151215
}
1216+
1217+
// Config retrieves the blockchain's chain configuration.
1218+
func (self *BlockChain) Config() *ChainConfig { return self.config }

0 commit comments

Comments
 (0)