Remove unknown events of parent block when processing a block (#323)

This commit is contained in:
prathamesh0 2021-12-20 17:00:14 +05:30 committed by GitHub
parent 5b632a72aa
commit 2bcf579859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -109,10 +109,6 @@ export class EventWatcher {
await this.publishBlockProgressToSubscribers(blockProgress);
if (blockProgress.isComplete) {
await this._indexer.removeUnknownEvents(blockProgress);
}
return this._indexer.getBlockEvents(
blockProgress.blockHash,
{

View File

@ -203,6 +203,9 @@ export class JobRunner {
}, { priority: newPriority });
throw new Error(message);
} else {
// Remove the unknown events of the parent block if it is marked complete.
await this._indexer.removeUnknownEvents(parentBlock);
}
} else {
blockProgress = parentBlock;