grid2: avoid using loop iterator var

This commit is contained in:
c9s 2023-02-25 02:24:39 +08:00
parent 04da988639
commit 98739cc8a1
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -1287,7 +1287,9 @@ func (s *Strategy) recoverGridWithOpenOrders(ctx context.Context, historyService
s.setGrid(grid)
s.EmitGridReady()
for _, o := range filledOrders {
for i := range filledOrders {
// avoid using the iterator
o := filledOrders[i]
s.processFilledOrder(o)
time.Sleep(100 * time.Millisecond)
}