aboutsummaryrefslogtreecommitdiffstats
path: root/mobile
diff options
context:
space:
mode:
authorEugene Valeyev <evgen.povt@gmail.com>2017-11-06 23:46:43 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-11-06 23:46:43 +0800
commitbfdc0fa3622d7c3b421d2f5a6dda5746be41bfde (patch)
tree3a43b779ce1298de578fe036a9446ec342f8a168 /mobile
parent9f7cd7568275e2db45a3d90429f7c92bf7dfbf19 (diff)
downloadgo-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar.gz
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar.bz2
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar.lz
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar.xz
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.tar.zst
go-tangerine-bfdc0fa3622d7c3b421d2f5a6dda5746be41bfde.zip
mobile: fix FilterLogs (#15418)
All logs in the FilterLog return value would be the same object because the for loop captured the pointer to the iteration variable.
Diffstat (limited to 'mobile')
-rw-r--r--mobile/ethclient.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mobile/ethclient.go b/mobile/ethclient.go
index 7f31a8998..758863b6d 100644
--- a/mobile/ethclient.go
+++ b/mobile/ethclient.go
@@ -198,8 +198,8 @@ func (ec *EthereumClient) FilterLogs(ctx *Context, query *FilterQuery) (logs *Lo
}
// Temp hack due to vm.Logs being []*vm.Log
res := make([]*types.Log, len(rawLogs))
- for i, log := range rawLogs {
- res[i] = &log
+ for i := range rawLogs {
+ res[i] = &rawLogs[i]
}
return &Logs{res}, nil
}