File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,7 @@ type Config struct {
288288 StagingS3AccessKeyID string `env:"STAGING_S3_ACCESS_KEY_ID"`
289289 StagingS3SecretAccessKey string `env:"STAGING_S3_SECRET_ACCESS_KEY"`
290290 StagingS3MaxParallelFileDownload int `env:"STAGING_S3_MAX_PARALLEL_FILE_DOWNLOAD" envDefault:"2"`
291+ CommitterRPCNumParallelCalls int64 `env:"COMMITTER_RPC_NUM_PARALLEL_CALLS" envDefault:"10"`
291292}
292293
293294var Cfg Config
Original file line number Diff line number Diff line change @@ -726,15 +726,14 @@ func fetchLatest(nextCommitBlockNumber *big.Int) error {
726726 continue
727727 }
728728
729- // Configuration variables
730- rpcBatchSize := int64 (50 ) // Number of blocks per batch
731- rpcNumParallelCalls := int64 (10 ) // Maximum number of parallel RPC calls
732- maxBlocksPerFetch := rpcBatchSize * rpcNumParallelCalls // Total blocks per fetch cycle
729+ rpcNumParallelCalls := config .Cfg .CommitterRPCNumParallelCalls
730+ rpcBatchSize := int64 (50 )
731+ maxBlocksPerFetch := rpcBatchSize * rpcNumParallelCalls
733732
734733 // Calculate the range of blocks to fetch
735734 blocksToFetch := new (big.Int ).Sub (latestBlock , nextCommitBlockNumber )
736735 if blocksToFetch .Cmp (big .NewInt (maxBlocksPerFetch )) > 0 {
737- blocksToFetch = big .NewInt (maxBlocksPerFetch ) // Limit to maxBlocksPerFetch blocks per batch
736+ blocksToFetch = big .NewInt (maxBlocksPerFetch )
738737 }
739738
740739 log .Info ().
You can’t perform that action at this time.
0 commit comments