mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
service: clean up Verify method signature
This commit is contained in:
parent
41191c4db5
commit
f65b343ea6
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user