From e2ac75246e68fa2157f13fb2a8308ceefa6058cf Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:16:53 +0200 Subject: [PATCH] fix: activate Shanghai in test --- core/genesis.go | 1 - core/state_processor_test.go | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 5c724342f5..2306598db5 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -344,7 +344,6 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen // We have the genesis block in database(perhaps in ancient database) // but the corresponding state is missing. header := rawdb.ReadHeader(db, stored, 0) - if header.Root != types.EmptyRootHash && !rawdb.HasLegacyTrieNode(db, header.Root) { if genesis == nil { genesis = DefaultGenesisBlock() diff --git a/core/state_processor_test.go b/core/state_processor_test.go index 8c0a14aa31..57f17d4b53 100644 --- a/core/state_processor_test.go +++ b/core/state_processor_test.go @@ -437,8 +437,9 @@ var ( func TestProcessVerkle(t *testing.T) { var ( - cancuntime uint64 = 0 - config = ¶ms.ChainConfig{ + cancuntime uint64 = 0 + shanghaiTime uint64 = 0 + config = ¶ms.ChainConfig{ ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(0), EIP150Block: big.NewInt(0), @@ -452,6 +453,7 @@ func TestProcessVerkle(t *testing.T) { BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), Ethash: new(params.EthashConfig), + ShanghaiTime: &shanghaiTime, CancunTime: &cancuntime, } signer = types.LatestSigner(config)