Skip to content

Commit 79315df

Browse files
remove comments + renames
1 parent 14805d5 commit 79315df

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/common/indexer/elastic/elastic.indexer.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ export class ElasticIndexerService implements IndexerInterface {
264264
.withPagination({ from: 0, size: hashes.length + 1 })
265265
.withShouldCondition(hashes.map(h => QueryType.Match('_id', h)));
266266

267-
// Map _id into "hash" on the response objects for easy joining
268267
return await this.elasticService.getList('executionresults', 'hash', elasticQuery);
269268
}
270269

src/endpoints/blocks/block.service.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ export class BlockService {
4242
async getBlocks(filter: BlockFilter, queryPagination: QueryPagination, withProposerIdentity?: boolean): Promise<Block[]> {
4343
const result = await this.indexerService.getBlocks(filter, queryPagination);
4444

45-
// If Supernova is enabled for any of these blocks, bulk fetch execution results and merge them
46-
const execMap = await this.fetchExecutionResultsForBlocks(result as any[]);
47-
if (execMap.size > 0) {
45+
const executionResultsMap = await this.fetchExecutionResultsForBlocks(result as any[]);
46+
if (executionResultsMap.size > 0) {
4847
for (const item of result as any[]) {
49-
const er = execMap.get(item.hash);
50-
if (er) {
51-
ApiUtils.mergeObjects(item, er);
48+
const executionResult = executionResultsMap.get(item.hash);
49+
if (executionResult) {
50+
ApiUtils.mergeObjects(item, executionResult);
5251
}
5352
}
5453
}
@@ -102,7 +101,6 @@ export class BlockService {
102101
}
103102
this.logger.log(`Applied executionresults for ${map.size} blocks out of ${eligible.length}.`);
104103
} catch {
105-
// Keep endpoint resilient if executionresults index is unavailable
106104
return map;
107105
}
108106

0 commit comments

Comments
 (0)