service: clean up Verify method signature

This commit is contained in:
c9s 2022-06-06 06:03:25 +08:00
parent 41191c4db5
commit f65b343ea6
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 3 additions and 3 deletions

View File

@ -600,7 +600,7 @@ func createSymbolReport(userConfig *bbgo.Config, session *bbgo.ExchangeSession,
func verify(userConfig *bbgo.Config, backtestService *service.BacktestService, sourceExchanges map[types.ExchangeName]types.Exchange, startTime time.Time, verboseCnt int) error {
for _, sourceExchange := range sourceExchanges {
err := backtestService.Verify(userConfig.Backtest.Symbols, startTime, time.Now(), sourceExchange, verboseCnt)
err := backtestService.Verify(sourceExchange, userConfig.Backtest.Symbols, startTime, time.Now())
if err != nil {
return err
}

View File

@ -62,11 +62,11 @@ func (s *BacktestService) SyncKLineByInterval(ctx context.Context, exchange type
return nil
}
func (s *BacktestService) Verify(symbols []string, startTime time.Time, endTime time.Time, sourceExchange types.Exchange, verboseCnt int) error {
func (s *BacktestService) Verify(sourceExchange types.Exchange, symbols []string, startTime time.Time, endTime time.Time) error {
var corruptCnt = 0
for _, symbol := range symbols {
for interval := range types.SupportedIntervals {
log.Infof("verifying %s %s backtesting data...", symbol, interval)
log.Infof("verifying %s %s backtesting data: %s to %s...", symbol, interval, startTime, endTime)
timeRanges, err := s.FindMissingTimeRanges(context.Background(), sourceExchange, symbol, interval, startTime, endTime)
if err != nil {