Asset update to fix minor stutter (#316)

This commit is contained in:
Ryan O'Hara-Reid
2019-06-17 09:02:07 +10:00
committed by Adrian Gallagher
parent b901c4b670
commit 20c24601fb
87 changed files with 976 additions and 966 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/thrasher-/gocryptotrader/config"
"github.com/thrasher-/gocryptotrader/currency"
"github.com/thrasher-/gocryptotrader/exchanges/assets"
"github.com/thrasher-/gocryptotrader/exchanges/asset"
"github.com/thrasher-/gocryptotrader/exchanges/orderbook"
log "github.com/thrasher-/gocryptotrader/logger"
)
@@ -429,7 +429,7 @@ func (w *Websocket) GetName() string {
func (w *WebsocketOrderbookLocal) Update(bidTargets, askTargets []orderbook.Item,
p currency.Pair,
updated time.Time,
exchName string, assetType assets.AssetType) error {
exchName string, assetType asset.Item) error {
if bidTargets == nil && askTargets == nil {
return errors.New("exchange.go websocket orderbook cache Update() error - cannot have bids and ask targets both nil")
}
@@ -556,7 +556,7 @@ func (w *WebsocketOrderbookLocal) LoadSnapshot(newOrderbook *orderbook.Base, exc
// UpdateUsingID updates orderbooks using specified ID
func (w *WebsocketOrderbookLocal) UpdateUsingID(bidTargets, askTargets []orderbook.Item,
p currency.Pair,
exchName string, assetType assets.AssetType, action string) error {
exchName string, assetType asset.Item, action string) error {
w.m.Lock()
defer w.m.Unlock()