eth: remove redundant chain config fields

This commit is contained in:
Péter Szilágyi
2019-03-27 13:23:08 +02:00
parent dba336e612
commit ac3e7c9b3d
4 changed files with 21 additions and 25 deletions

View File

@ -44,7 +44,7 @@ type EthAPIBackend struct {
// ChainConfig returns the active chain configuration.
func (b *EthAPIBackend) ChainConfig() *params.ChainConfig {
return b.eth.chainConfig
return b.eth.blockchain.Config()
}
func (b *EthAPIBackend) CurrentBlock() *types.Block {
@ -130,7 +130,7 @@ func (b *EthAPIBackend) GetEVM(ctx context.Context, msg core.Message, state *sta
vmError := func() error { return nil }
context := core.NewEVMContext(msg, header, b.eth.BlockChain(), nil)
return vm.NewEVM(context, state, b.eth.chainConfig, *b.eth.blockchain.GetVMConfig()), vmError, nil
return vm.NewEVM(context, state, b.eth.blockchain.Config(), *b.eth.blockchain.GetVMConfig()), vmError, nil
}
func (b *EthAPIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription {