@@ -11,6 +11,8 @@ import { Level } from 'level'
1111import { EthereumClient } from '../src/client.js'
1212import { DataDirectory } from '../src/config.js'
1313import { LevelDB } from '../src/execution/level.js'
14+ import { eraSync } from '../src/sync/erasync.js'
15+ import { type ClientOpts } from '../src/types.js'
1416import { generateVKTStateRoot } from '../src/util/vkt.js'
1517
1618import { helpRPC , startRPCServers } from './startRPC.js'
@@ -19,7 +21,6 @@ import { generateClientConfig, getArgs } from './utils.js'
1921import type { Config } from '../src/config.js'
2022import type { Logger } from '../src/logging.js'
2123import type { FullEthereumService } from '../src/service/index.js'
22- import type { ClientOpts } from '../src/types.js'
2324import type { RPCArgs } from './startRPC.js'
2425import type { Block , BlockBytes } from '@ethereumjs/block'
2526import type { ConsensusDict } from '@ethereumjs/blockchain'
@@ -220,7 +221,9 @@ async function startClient(
220221 ...dbs ,
221222 } )
222223 await client . open ( )
223-
224+ if ( args . loadBlocksFromEra1 !== undefined ) {
225+ await eraSync ( client , config , { loadBlocksFromEra1 : args . loadBlocksFromEra1 } )
226+ }
224227 if ( args . loadBlocksFromRlp !== undefined ) {
225228 // Specifically for Hive simulator, preload blocks provided in RLP format
226229 const blocks : Block [ ] = [ ]
0 commit comments