Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Dec 2, 2024
1 parent ce2d0dd commit a858912
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions packages/node-core/src/db/sync-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@ export function createSchemaTriggerFunction(schema: string): string {
$$ LANGUAGE plpgsql;`;
}

// export function enumNameToHash(enumName: string): string {
// return blake2AsHex(enumName).substr(2, 10);
// }

export function getExistedIndexesQuery(schema: string): string {
return `SELECT indexname FROM pg_indexes WHERE schemaname = '${schema}'`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export abstract class BaseBlockDispatcher<Q extends IQueue, DS, B> implements IB
}

get batchSize(): number {
// TODO make this smarter
return this.nodeConfig.batchSize;
}

Expand Down
12 changes: 0 additions & 12 deletions packages/node-core/src/indexer/fetch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,6 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo

const latestHeight = this.latestHeight();

console.log(
'XXXX',
this.blockDispatcher.freeSize,
scaledBatchSize,
startBlockHeight,
latestHeight,
this.blockDispatcher.freeSize < scaledBatchSize || startBlockHeight > latestHeight
);
if (this.blockDispatcher.freeSize < scaledBatchSize || startBlockHeight > latestHeight) {
if (this.blockDispatcher.freeSize < scaledBatchSize) {
logger.debug(
Expand Down Expand Up @@ -268,7 +260,6 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo
await this.enqueueSequential(startBlockHeight, scaledBatchSize, latestHeight);
}
} catch (e: any) {
console.log('RERRR', e);
logger.debug(`Fetch dictionary stopped: ${e.message}`);
this.eventEmitter.emit(IndexerEvent.SkipDictionary);
await this.enqueueSequential(startBlockHeight, scaledBatchSize, latestHeight);
Expand Down Expand Up @@ -325,7 +316,6 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo
scaledBatchSize: number,
latestHeight: number
): Promise<void> {
console.log('FFFF');
// End height from current dataSource
const {endHeight, value: relevantDs} = this.getRelevantDsDetails(startBlockHeight);
// Estimated range end height
Expand All @@ -338,7 +328,6 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo
? this.getEnqueuedModuloBlocks(startBlockHeight, latestHeight)
: range(startBlockHeight, estRangeEndHeight + 1);

console.log('GGGGGG', enqueuingBlocks, estRangeEndHeight);
await this.enqueueBlocks(enqueuingBlocks, estRangeEndHeight);
}

Expand All @@ -347,7 +336,6 @@ export abstract class BaseFetchService<DS extends BaseDataSource, B extends IBlo
...this.projectService.bypassBlocks,
...this.getDatasourceBypassBlocks(),
]);
console.log('EEEEEE', cleanedBatchBlocks);
await this.blockDispatcher.enqueueBlocks(
cleanedBatchBlocks,
this.getLatestBufferHeight(enqueuingBlocks, latestHeight)
Expand Down

0 comments on commit a858912

Please sign in to comment.