Skip to content

core/coregeth_migration.go

Type NEW
Upstream Lines
Changed +101 -0

One-shot on-disk migration of a core-geth datadir. core-geth stores the chain config under go-ethereum's DB key but with its own JSON field names (eip2FBlock…), so getc reads it with HomesteadBlock=nil and CheckCompatible would rewind the chain to Homestead (~1.15M), forcing a near-full resync. On first start, detects this and rewrites the config in getc's canonical format for known ETC genesis hashes (Classic/Mordor). Idempotent; a no-op for empty, non-ETC, or already-migrated datadirs. Invoked once from eth/backend.go; safe to delete once core-geth is deprecated.

View full file on GitHub

← Back to CLI, Config & Genesis