mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-08 15:11:07 +00:00
engine/websocket: subscribe to default channels only when actually needed (#610)
* if this is required by ws routines or sync manager * restore previous subscriptions on reconnect
This commit is contained in:
@@ -11,18 +11,19 @@ import (
|
||||
|
||||
var ordersSetupRan bool
|
||||
|
||||
func OrdersSetup(t *testing.T) {
|
||||
SetupTestHelpers(t)
|
||||
func OrdersSetup(t *testing.T) *Engine {
|
||||
bot := SetupTestHelpers(t)
|
||||
if !ordersSetupRan {
|
||||
err := Bot.OrderManager.Start()
|
||||
err := bot.OrderManager.Start()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !Bot.OrderManager.Started() {
|
||||
if !bot.OrderManager.Started() {
|
||||
t.Fatal("Order manager not started")
|
||||
}
|
||||
ordersSetupRan = true
|
||||
}
|
||||
return bot
|
||||
}
|
||||
|
||||
func TestOrdersGet(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user