mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
fix: debug code
This commit is contained in:
parent
b52598d1ad
commit
a28b257568
|
@ -377,14 +377,13 @@ func (e *Exchange) ConsumeKLine(k types.KLine) {
|
||||||
kline1m, ok := matching.klineCache[k.Interval]
|
kline1m, ok := matching.klineCache[k.Interval]
|
||||||
if ok { // pop out all the old
|
if ok { // pop out all the old
|
||||||
if kline1m.Interval != types.Interval1m {
|
if kline1m.Interval != types.Interval1m {
|
||||||
panic("expect 1m kline, get " + kline1m.Interval.String())
|
panic("expect 1m kline, got " + kline1m.Interval.String())
|
||||||
}
|
}
|
||||||
e.currentTime = kline1m.EndTime.Time()
|
e.currentTime = kline1m.EndTime.Time()
|
||||||
// here we generate trades and order updates
|
// here we generate trades and order updates
|
||||||
matching.processKLine(kline1m)
|
matching.processKLine(kline1m)
|
||||||
matching.NextKLine = &k
|
matching.NextKLine = &k
|
||||||
for _, kline := range matching.klineCache {
|
for _, kline := range matching.klineCache {
|
||||||
// log.Errorf("kline %v, next %v", param.kline, matching.NextKLine)
|
|
||||||
e.MarketDataStream.EmitKLineClosed(kline)
|
e.MarketDataStream.EmitKLineClosed(kline)
|
||||||
for _, h := range e.Src.Callbacks {
|
for _, h := range e.Src.Callbacks {
|
||||||
h(kline, e.Src)
|
h(kline, e.Src)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user