Skip to content

Commit

Permalink
remove useless Config() (#2326)
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 authored Mar 22, 2024
1 parent 8e6835b commit 96605e4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions consensus/parlia/parlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -1966,10 +1966,6 @@ func (c chainContext) Engine() consensus.Engine {
return c.parlia
}

func (c chainContext) Config() *params.ChainConfig {
return c.Chain.Config()
}

func (c chainContext) GetHeader(hash common.Hash, number uint64) *types.Header {
return c.Chain.GetHeader(hash, number)
}
Expand Down
4 changes: 0 additions & 4 deletions core/data_availability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ func (r *mockDAHeaderReader) setChasingHead(h uint64) {
r.chasingHead = h
}

func (r *mockDAHeaderReader) Config() *params.ChainConfig {
return r.config
}

func (r *mockDAHeaderReader) CurrentHeader() *types.Header {
return &types.Header{
Number: new(big.Int).SetUint64(r.chasingHead),
Expand Down
5 changes: 0 additions & 5 deletions core/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package core
import (
"math/big"

"github.com/ethereum/go-ethereum/params"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
Expand All @@ -37,9 +35,6 @@ type ChainContext interface {

// GetHeader returns the header corresponding to the hash/number argument pair.
GetHeader(common.Hash, uint64) *types.Header

// Config retrieves the chain config.
Config() *params.ChainConfig
}

// NewEVMBlockContext creates a new context for use in the EVM.
Expand Down
4 changes: 0 additions & 4 deletions core/vm/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ func (d *dummyChain) Engine() consensus.Engine {
return nil
}

func (d *dummyChain) Config() *params.ChainConfig {
return nil
}

// GetHeader returns the hash corresponding to their hash.
func (d *dummyChain) GetHeader(h common.Hash, n uint64) *types.Header {
d.counter++
Expand Down
5 changes: 0 additions & 5 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,6 @@ func (diff *BlockOverrides) Apply(blockCtx *vm.BlockContext) {
type ChainContextBackend interface {
Engine() consensus.Engine
HeaderByNumber(context.Context, rpc.BlockNumber) (*types.Header, error)
ChainConfig() *params.ChainConfig
}

// ChainContext is an implementation of core.ChainContext. It's main use-case
Expand All @@ -1175,10 +1174,6 @@ func (context *ChainContext) Engine() consensus.Engine {
return context.b.Engine()
}

func (context *ChainContext) Config() *params.ChainConfig {
return context.b.ChainConfig()
}

func (context *ChainContext) GetHeader(hash common.Hash, number uint64) *types.Header {
// This method is called to get the hash for a block number when executing the BLOCKHASH
// opcode. Hence no need to search for non-canonical blocks.
Expand Down

0 comments on commit 96605e4

Please sign in to comment.