@@ -159,6 +159,10 @@ export class Restore {
159159 @optional ( )
160160 private readonly snapshotImporter ?: Contracts . Snapshot . LegacyImporter ;
161161
162+ @inject ( Identifiers . ServiceProvider . Configuration )
163+ @tagged ( "plugin" , "api-sync" )
164+ private readonly pluginConfiguration ! : Contracts . Kernel . PluginConfiguration ;
165+
162166 public async restore ( ) : Promise < void > {
163167 const isEmpty = await this . databaseService . isEmpty ( ) ;
164168 const mostRecentCommit = await ( isEmpty
@@ -299,15 +303,16 @@ export class Restore {
299303 validatorRounds,
300304 } = context ;
301305
302- const BATCH_SIZE = 1000 ;
303- const CHUNK_SIZE = 1000 ;
306+ const BATCH_SIZE = this . pluginConfiguration . getRequired < number > ( "restore.blocks.batchSize" ) ;
307+ const CHUNK_SIZE = BATCH_SIZE ;
304308 const t0 = performance . now ( ) ;
305309
306310 const genesisBlockNumber = this . configuration . getGenesisHeight ( ) ;
307311 let currentBlockNumber = genesisBlockNumber ;
308312
309313 let ingestedBlocks = 0 ;
310314 let ingestedTransactions = 0 ;
315+ let totalRound = 0 ;
311316
312317 const multiPaymentContractAddress = this . app . get < string > (
313318 EvmConsensusIdentifiers . Contracts . Addresses . MultiPayment ,
@@ -383,7 +388,6 @@ export class Restore {
383388 }
384389 } ;
385390
386- let totalRound = 0 ;
387391 for await ( const { block, proof } of commits ) {
388392 blocks . push ( {
389393 commitRound : proof . round ,
0 commit comments