remove timepoint map

This commit is contained in:
c9s 2022-06-05 01:57:40 +08:00
parent c20e3fee4b
commit 4b582830f0
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -389,7 +389,6 @@ func (s *BacktestService) FindMissingTimeRanges(ctx context.Context, ex types.Ex
}
var timeRanges []TimeRange
var timePoints = make(map[int64]struct{}, 1000) // we can use this to find duplicates
var lastTime time.Time
var intervalDuration = interval.Duration()
for rows.Next() {
@ -407,7 +406,6 @@ func (s *BacktestService) FindMissingTimeRanges(ctx context.Context, ex types.Ex
}
lastTime = t
timePoints[t.Unix()] = struct{}{}
}
return timeRanges, nil