From 53a08f0c13e463f24334d4db8487d3ffc9b22e69 Mon Sep 17 00:00:00 2001 From: Dror Tirosh Date: Wed, 5 Jun 2024 14:46:44 +0300 Subject: [PATCH] refactor dev genesis --- tests/rip7560/rip7560TestUtils.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/rip7560/rip7560TestUtils.go b/tests/rip7560/rip7560TestUtils.go index d891d4b223..38905c8f99 100644 --- a/tests/rip7560/rip7560TestUtils.go +++ b/tests/rip7560/rip7560TestUtils.go @@ -39,10 +39,7 @@ type testContextBuilder struct { func newTestContextBuilder(t *testing.T) *testContextBuilder { genesisAlloc := types.GenesisAlloc{} - chainConfig := params.AllDevChainProtocolChanges - // probably bug in geth.. - chainConfig.PragueTime = chainConfig.CancunTime return &testContextBuilder{ t: t, @@ -53,9 +50,11 @@ func newTestContextBuilder(t *testing.T) *testContextBuilder { func (tb *testContextBuilder) build() *testContext { genesis := &core.Genesis{ - Config: params.AllDevChainProtocolChanges, - Alloc: tb.genesisAlloc, + Config: tb.chainConfig, + Alloc: tb.genesisAlloc, + Difficulty: big.NewInt(0), } + genesis = core.DeveloperGenesisBlock(10_000_000, &common.Address{}) genesisBlock := genesis.ToBlock() gaspool := new(core.GasPool).AddGas(genesisBlock.GasLimit())