mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 23:16:53 +00:00
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:
@@ -487,7 +487,7 @@ func TestCancelAllExchangeOrders(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestModifyOrder(t *testing.T) {
|
||||
_, err := b.ModifyOrder(exchange.ModifyOrder{})
|
||||
_, err := b.ModifyOrder(&exchange.ModifyOrder{})
|
||||
if err == nil {
|
||||
t.Error("Test failed - ModifyOrder() error")
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ func (b *Bitstamp) WsConnect() error {
|
||||
return err
|
||||
}
|
||||
|
||||
var newOrderbook orderbook.Base
|
||||
var newOrderBook orderbook.Base
|
||||
|
||||
var asks []orderbook.Item
|
||||
for _, ask := range orderbookSeed.Asks {
|
||||
@@ -125,12 +125,12 @@ func (b *Bitstamp) WsConnect() error {
|
||||
bids = append(bids, item)
|
||||
}
|
||||
|
||||
newOrderbook.Asks = asks
|
||||
newOrderbook.Bids = bids
|
||||
newOrderbook.Pair = p
|
||||
newOrderbook.AssetType = "SPOT"
|
||||
newOrderBook.Asks = asks
|
||||
newOrderBook.Bids = bids
|
||||
newOrderBook.Pair = p
|
||||
newOrderBook.AssetType = "SPOT"
|
||||
|
||||
err = b.Websocket.Orderbook.LoadSnapshot(newOrderbook, b.GetName(), false)
|
||||
err = b.Websocket.Orderbook.LoadSnapshot(&newOrderBook, b.GetName(), false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ func (b *Bitstamp) SubmitOrder(p currency.Pair, side exchange.OrderSide, orderTy
|
||||
|
||||
// ModifyOrder will allow of changing orderbook placement and limit to
|
||||
// market conversion
|
||||
func (b *Bitstamp) ModifyOrder(action exchange.ModifyOrder) (string, error) {
|
||||
func (b *Bitstamp) ModifyOrder(action *exchange.ModifyOrder) (string, error) {
|
||||
return "", common.ErrFunctionNotSupported
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user