fix: comment format, dbg logs in session

This commit is contained in:
zenix 2022-10-19 14:59:37 +09:00
parent d247e1cb97
commit 3d672ea518
2 changed files with 2 additions and 4 deletions

View File

@ -422,7 +422,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
// always subscribe the 1m kline so we can make sure the connection persists.
klineSubscriptions[minInterval] = struct{}{}
log.Warnf("sub: %v", klineSubscriptions)
for interval := range klineSubscriptions {
// avoid querying the last unclosed kline
@ -451,8 +450,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
session.lastPrices[symbol] = lastKLine.Close
}
log.Warnf("load %s", interval)
for _, k := range kLines {
// let market data store trigger the update, so that the indicator could be updated too.
marketDataStore.AddKLine(k)

View File

@ -25,7 +25,8 @@ func (i Interval) Seconds() int {
return m
}
// specially handled, for better precision
// Milliseconds is specially handled, for better precision
// for ms level interval, calling Seconds and Minutes directly might trigger panic error
func (i Interval) Milliseconds() int {
t := 0
index := 0