Optimisation: large structs/huge param fixes (part 2) (#262)

* updated golangci config to enable hugeparam linter

* ModifyOrder struct usage converted to a pointer

* OrderBook conversion to struct

* More conversion of large structs to pointers

* updated golangci config to enable hugeparam linter

* ModifyOrder struct usage converted to a pointer

* OrderBook conversion to struct

* More conversion of large structs to pointers

* disabled hugeParam check for golang again

* changed based on suggested feedback and fix for no default provider

* fixed typing
This commit is contained in:
Andrew
2019-03-26 15:40:46 +11:00
committed by Adrian Gallagher
parent 5683fdd917
commit dc236c251e
87 changed files with 234 additions and 232 deletions

View File

@@ -375,7 +375,7 @@ func TestGetAccountInfo(t *testing.T) {
}
func TestModifyOrder(t *testing.T) {
_, err := z.ModifyOrder(exchange.ModifyOrder{})
_, err := z.ModifyOrder(&exchange.ModifyOrder{})
if err == nil {
t.Error("Test failed - ModifyOrder() error")
}

View File

@@ -223,13 +223,13 @@ func (z *ZB) WsHandleData() {
channelInfo := common.SplitStrings(result.Channel, "_")
cPair := currency.NewPairFromString(channelInfo[0])
var newOrderbook orderbook.Base
newOrderbook.Asks = asks
newOrderbook.Bids = bids
newOrderbook.AssetType = "SPOT"
newOrderbook.Pair = cPair
var newOrderBook orderbook.Base
newOrderBook.Asks = asks
newOrderBook.Bids = bids
newOrderBook.AssetType = "SPOT"
newOrderBook.Pair = cPair
err = z.Websocket.Orderbook.LoadSnapshot(newOrderbook,
err = z.Websocket.Orderbook.LoadSnapshot(&newOrderBook,
z.GetName(),
true)
if err != nil {

View File

@@ -217,7 +217,7 @@ func (z *ZB) SubmitOrder(p currency.Pair, side exchange.OrderSide, _ exchange.Or
// ModifyOrder will allow of changing orderbook placement and limit to
// market conversion
func (z *ZB) ModifyOrder(action exchange.ModifyOrder) (string, error) {
func (z *ZB) ModifyOrder(action *exchange.ModifyOrder) (string, error) {
return "", common.ErrFunctionNotSupported
}