mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-23 15:10:15 +00:00
Merge branch 'master' into engine
This commit is contained in:
@@ -257,6 +257,7 @@ func PrintSettings(s *Settings) {
|
||||
|
||||
// Start starts the engine
|
||||
func (e *Engine) Start() {
|
||||
// TO-DO: move this out of here
|
||||
if e == nil {
|
||||
log.Errorln(log.Global, "Engine instance is nil")
|
||||
os.Exit(1)
|
||||
@@ -301,6 +302,11 @@ func (e *Engine) Start() {
|
||||
|
||||
log.Debugln(log.Global, "Setting up exchanges..")
|
||||
SetupExchanges()
|
||||
// TO-DO: move this out of here
|
||||
if len(Bot.Exchanges) == 0 {
|
||||
log.Errorln(log.Global, "No exchanges were able to be loaded. Exiting")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if e.Settings.EnableCommsRelayer {
|
||||
if err := e.CommsManager.Start(); err != nil {
|
||||
|
||||
@@ -2,7 +2,6 @@ package engine
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -313,8 +312,4 @@ func SetupExchanges() {
|
||||
)
|
||||
}
|
||||
wg.Wait()
|
||||
if len(Bot.Exchanges) == 0 {
|
||||
log.Errorln(log.Global, "No exchanges were able to be loaded. Exiting")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user