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) {