fix: don't use goroutines for processing logs

This commit is contained in:
Richard Ramos 2022-08-10 09:05:56 -04:00
parent 893f9f396c
commit f486236d0d
1 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ func (rln *WakuRLNRelay) loadOldEvents(rlnContract *contracts.RLN, handler Regis
if !logIterator.Next() || logIterator.Error() != nil {
break
}
go processLogs(logIterator.Event, handler)
processLogs(logIterator.Event, handler)
}
return nil
}
@ -164,7 +164,7 @@ func (rln *WakuRLNRelay) watchNewEvents(rlnContract *contracts.RLN, handler Regi
for {
select {
case evt := <-logSink:
go processLogs(evt, handler)
processLogs(evt, handler)
case <-rln.ctx.Done():
subs.Unsubscribe()
close(logSink)