mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-02-08 11:02:52 +00:00
Remove unknown events of parent block when processing a block (#323)
This commit is contained in:
parent
5b632a72aa
commit
2bcf579859
@ -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,
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user