Skip to content

Commit bf6c763

Browse files
committed
core: avoid modifying chain config in test
1 parent 39d9834 commit bf6c763

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/chain_makers_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ func TestGenerateWithdrawalChain(t *testing.T) {
3939
aa = common.Address{0xaa}
4040
bb = common.Address{0xbb}
4141
funds = big.NewInt(0).Mul(big.NewInt(1337), big.NewInt(params.Ether))
42+
config = *params.AllEthashProtocolChanges
4243
gspec = &Genesis{
43-
Config: params.AllEthashProtocolChanges,
44+
Config: &config,
4445
Alloc: GenesisAlloc{address: {Balance: funds}},
4546
BaseFee: big.NewInt(params.InitialBaseFee),
4647
Difficulty: common.Big1,
@@ -50,9 +51,10 @@ func TestGenerateWithdrawalChain(t *testing.T) {
5051
signer = types.LatestSigner(gspec.Config)
5152
db = rawdb.NewMemoryDatabase()
5253
)
53-
gspec.Config.TerminalTotalDifficultyPassed = true
54-
gspec.Config.TerminalTotalDifficulty = common.Big0
55-
gspec.Config.ShanghaiTime = u64(0)
54+
55+
config.TerminalTotalDifficultyPassed = true
56+
config.TerminalTotalDifficulty = common.Big0
57+
config.ShanghaiTime = u64(0)
5658

5759
// init 0xaa with some storage elements
5860
storage := make(map[common.Hash]common.Hash)

0 commit comments

Comments
 (0)