From 7a4bd061042747b75234eab84ac523b9f0a6afdc Mon Sep 17 00:00:00 2001 From: stevemilk Date: Tue, 13 Aug 2024 10:49:06 +0800 Subject: [PATCH] replace goerli with sepolia in testSetupGenesis --- core/genesis_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/genesis_test.go b/core/genesis_test.go index 8ea94be299..ad602db4be 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -95,6 +95,17 @@ func testSetupGenesis(t *testing.T, scheme string) { wantHash: customghash, wantConfig: customg.Config, }, + { + name: "custom block in DB, genesis == sepolia", + fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { + tdb := triedb.NewDatabase(db, newDbConfig(scheme)) + customg.Commit(db, tdb) + return SetupGenesisBlock(db, tdb, DefaultSepoliaGenesisBlock()) + }, + wantErr: &GenesisMismatchError{Stored: customghash, New: params.SepoliaGenesisHash}, + wantHash: params.SepoliaGenesisHash, + wantConfig: params.SepoliaChainConfig, + }, { name: "compatible config in DB", fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {