fix: update lastProcessedBlock even if no RLN membership event is present (#1013)

This commit is contained in:
Prem Chaitanya Prathi 2024-01-26 15:38:37 +05:30 committed by GitHub
parent 3be0edbf14
commit 0f00fb8d96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -73,11 +73,13 @@ func (gm *DynamicGroupManager) handler(events []*contracts.RLNMemberRegistered,
}
eventsPerBlock = append(eventsPerBlock, event)
toInsertTable.Set(event.Raw.BlockNumber, eventsPerBlock)
if event.Raw.BlockNumber > lastBlockProcessed {
lastBlockProcessed = event.Raw.BlockNumber
}
}
if event.Raw.BlockNumber > lastBlockProcessed {
lastBlockProcessed = event.Raw.BlockNumber
}
}
if len(events) == 0 {
lastBlockProcessed = latestProcessBlock
}
err := gm.RemoveMembers(toRemoveTable)