From f65b343ea6cc518336871a38f64b97ad5db2a39c Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 6 Jun 2022 06:03:25 +0800 Subject: [PATCH] service: clean up Verify method signature --- pkg/cmd/backtest.go | 2 +- pkg/service/backtest.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/backtest.go b/pkg/cmd/backtest.go index ae0dd9b1a..17cef4de4 100644 --- a/pkg/cmd/backtest.go +++ b/pkg/cmd/backtest.go @@ -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 } diff --git a/pkg/service/backtest.go b/pkg/service/backtest.go index 5363888e5..ed65b02df 100644 --- a/pkg/service/backtest.go +++ b/pkg/service/backtest.go @@ -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 {