minor fix

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Sina Mahmoodi 2023-07-07 18:37:53 +02:00 committed by jsvisa
parent 87d8a67b4d
commit c1f986b8d3

View file

@ -411,6 +411,7 @@ func (api *FilterAPI) histLogs(notifier notifier, rpcSub *rpc.Subscription, from
// we have delivered logs from old chain. // we have delivered logs from old chain.
for _, log := range logs { for _, log := range logs {
if log.BlockNumber <= delivered { if log.BlockNumber <= delivered {
log := log
notifier.Notify(rpcSub.ID, &log) notifier.Notify(rpcSub.ID, &log)
} }
} }
@ -418,6 +419,7 @@ func (api *FilterAPI) histLogs(notifier notifier, rpcSub *rpc.Subscription, from
// New logs are emitted for the whole new chain since the reorg block. // New logs are emitted for the whole new chain since the reorg block.
// Send them all. // Send them all.
for _, log := range logs { for _, log := range logs {
log := log
notifier.Notify(rpcSub.ID, &log) notifier.Notify(rpcSub.ID, &log)
} }
} }