@@ -11,6 +11,8 @@ import { Level } from 'level'
11
11
import { EthereumClient } from '../src/client.js'
12
12
import { DataDirectory } from '../src/config.js'
13
13
import { LevelDB } from '../src/execution/level.js'
14
+ import { eraSync } from '../src/sync/erasync.js'
15
+ import { type ClientOpts } from '../src/types.js'
14
16
import { generateVKTStateRoot } from '../src/util/vkt.js'
15
17
16
18
import { helpRPC , startRPCServers } from './startRPC.js'
@@ -19,7 +21,6 @@ import { generateClientConfig, getArgs } from './utils.js'
19
21
import type { Config } from '../src/config.js'
20
22
import type { Logger } from '../src/logging.js'
21
23
import type { FullEthereumService } from '../src/service/index.js'
22
- import type { ClientOpts } from '../src/types.js'
23
24
import type { RPCArgs } from './startRPC.js'
24
25
import type { Block , BlockBytes } from '@ethereumjs/block'
25
26
import type { ConsensusDict } from '@ethereumjs/blockchain'
@@ -219,7 +220,9 @@ async function startClient(
219
220
...dbs ,
220
221
} )
221
222
await client . open ( )
222
-
223
+ if ( args . loadBlocksFromEra1 !== undefined ) {
224
+ await eraSync ( client , config , { loadBlocksFromEra1 : args . loadBlocksFromEra1 } )
225
+ }
223
226
if ( args . loadBlocksFromRlp !== undefined ) {
224
227
// Specifically for Hive simulator, preload blocks provided in RLP format
225
228
const blocks : Block [ ] = [ ]
0 commit comments