mirror of https://github.com/status-im/go-waku.git
fix: don't use goroutines for processing logs
This commit is contained in:
parent
893f9f396c
commit
f486236d0d
|
@ -148,7 +148,7 @@ func (rln *WakuRLNRelay) loadOldEvents(rlnContract *contracts.RLN, handler Regis
|
||||||
if !logIterator.Next() || logIterator.Error() != nil {
|
if !logIterator.Next() || logIterator.Error() != nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
go processLogs(logIterator.Event, handler)
|
processLogs(logIterator.Event, handler)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ func (rln *WakuRLNRelay) watchNewEvents(rlnContract *contracts.RLN, handler Regi
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case evt := <-logSink:
|
case evt := <-logSink:
|
||||||
go processLogs(evt, handler)
|
processLogs(evt, handler)
|
||||||
case <-rln.ctx.Done():
|
case <-rln.ctx.Done():
|
||||||
subs.Unsubscribe()
|
subs.Unsubscribe()
|
||||||
close(logSink)
|
close(logSink)
|
||||||
|
|
Loading…
Reference in New Issue