Skip to content

Commit

Permalink
less use of params.Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Oct 14, 2024
1 parent ba3f538 commit bf9a87f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/state_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func u64(val uint64) *uint64 { return &val }
// blockchain imports bad blocks, meaning blocks which have valid headers but
// contain invalid transactions
func TestStateProcessorErrors(t *testing.T) {
cpcfg := params.Copy(params.TestChainConfig)
cpcfg := *params.TestChainConfig
config := &cpcfg
config.ShanghaiTime = u64(0)
config.CancunTime = u64(0)
Expand Down
2 changes: 1 addition & 1 deletion core/txpool/blobpool/blobpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var testChainConfig *params.ChainConfig

func init() {
testChainConfig = new(params.ChainConfig)
*testChainConfig = params.Copy(params.TestChainConfig)
*testChainConfig = *params.TestChainConfig

testChainConfig.CancunTime = new(uint64)
*testChainConfig.CancunTime = uint64(time.Now().Unix())
Expand Down
2 changes: 1 addition & 1 deletion ethclient/simulated/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type Backend struct {
//
// A simulated backend always uses chainID 1337.
func NewBackend(alloc types.GenesisAlloc, options ...func(nodeConf *node.Config, ethConf *ethconfig.Config)) *Backend {
chainConfig := params.Copy(params.TestChainConfig)
chainConfig := *params.TestChainConfig
chainConfig.ChainID = big.NewInt(1337)

// Create the default configurations for the outer node shell and the Ethereum
Expand Down

0 comments on commit bf9a87f

Please sign in to comment.