feat(filters): send correct log payload to notifier to avoid pointer aliasing

This commit is contained in:
VolodymyrBg 2025-08-27 16:21:36 +03:00 committed by GitHub
parent 52ec2b5f47
commit bf9b54a568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -284,7 +284,7 @@ func (api *FilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subsc
select { select {
case logs := <-matchedLogs: case logs := <-matchedLogs:
for _, log := range logs { for _, log := range logs {
notifier.Notify(rpcSub.ID, &log) notifier.Notify(rpcSub.ID, log)
} }
case <-rpcSub.Err(): // client send an unsubscribe request case <-rpcSub.Err(): // client send an unsubscribe request
return return