good morning!!!!

Skip to content
Snippets Groups Projects
Commit bfdc0fa3 authored by Eugene Valeyev's avatar Eugene Valeyev Committed by Felix Lange
Browse files

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.
parent 9f7cd756
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment