diff --git a/eth/filters/api.go b/eth/filters/api.go index 4697b60e89..45010db199 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -564,8 +564,7 @@ func notifyLogsIf(notifier notifier, id rpc.ID, logs []*types.Log, hashes *lru.B hashes.Add(batch.hash, struct{}{}) } for _, log := range logs[batch.start:batch.end] { - log := log - notifier.Notify(id, &log) + notifier.Notify(id, log) } } } diff --git a/eth/filters/filter_system_test.go b/eth/filters/filter_system_test.go index 7a945b64f9..8057f524f6 100644 --- a/eth/filters/filter_system_test.go +++ b/eth/filters/filter_system_test.go @@ -880,7 +880,7 @@ func TestLogsSubscription(t *testing.T) { for { select { case log := <-tt.notifier.c: - fetched = append(fetched, *log.(**types.Log)) + fetched = append(fetched, log.(*types.Log)) case <-timeout: break fetchLoop } @@ -941,7 +941,6 @@ func parseTransferLog(log *types.Log) (from, to common.Address, amount uint64) { func calculateBalance(logs []*types.Log) map[common.Address]uint64 { balances := make(map[common.Address]uint64) for _, log := range logs { - log := log from, to, amount := parseTransferLog(log) if _, ok := balances[from]; !ok { @@ -1042,7 +1041,7 @@ func testLogsSubscriptionReorg(t *testing.T, oldChainMaker, newChainMaker, pendi for { select { case log := <-notifier.c: - l := *log.(**types.Log) + l := log.(*types.Log) fetched = append(fetched, l) // We halt the sender by blocking Notify(). However sender will already prepare