mirror of https://github.com/status-im/go-waku.git
fix: update lastProcessedBlock even if no RLN membership event is present (#1013)
This commit is contained in:
parent
3be0edbf14
commit
0f00fb8d96
|
@ -73,11 +73,13 @@ func (gm *DynamicGroupManager) handler(events []*contracts.RLNMemberRegistered,
|
||||||
}
|
}
|
||||||
eventsPerBlock = append(eventsPerBlock, event)
|
eventsPerBlock = append(eventsPerBlock, event)
|
||||||
toInsertTable.Set(event.Raw.BlockNumber, eventsPerBlock)
|
toInsertTable.Set(event.Raw.BlockNumber, eventsPerBlock)
|
||||||
|
}
|
||||||
if event.Raw.BlockNumber > lastBlockProcessed {
|
if event.Raw.BlockNumber > lastBlockProcessed {
|
||||||
lastBlockProcessed = event.Raw.BlockNumber
|
lastBlockProcessed = event.Raw.BlockNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(events) == 0 {
|
||||||
|
lastBlockProcessed = latestProcessBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
err := gm.RemoveMembers(toRemoveTable)
|
err := gm.RemoveMembers(toRemoveTable)
|
||||||
|
|
Loading…
Reference in New Issue