mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
orderbook: Refactor package structure for simplicity and efficiency (#1465)
* initial purge and benchmarks proof before rn overhaul * rn LinkedList -> Tranche(s) and purge references * roll out acrost exchanges * linterino * rn silly billy label * linter strikes AAAAAGAIN! * fix some things * rm comment * Add actual comparison from master to branch benchmark for sorting algorithms * lower case via git mv YAAY! * drop code * convert type name * glorious: nits --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -281,17 +281,17 @@ func ({{.Variable}} *{{.CapitalName}}) UpdateOrderbook(ctx context.Context, pair
|
||||
return book, err
|
||||
}
|
||||
|
||||
book.Bids = make([]orderbook.Item, len(orderbookNew.Bids))
|
||||
book.Bids = make([]orderbook.Tranche, len(orderbookNew.Bids))
|
||||
for x := range orderbookNew.Bids {
|
||||
book.Bids[x] = orderbook.Item{
|
||||
book.Bids[x] = orderbook.Tranche{
|
||||
Amount: orderbookNew.Bids[x].Quantity,
|
||||
Price: orderbookNew.Bids[x].Price,
|
||||
}
|
||||
}
|
||||
|
||||
book.Asks = make([]orderbook.Item, len(orderbookNew.Asks))
|
||||
book.Asks = make([]orderbook.Tranche, len(orderbookNew.Asks))
|
||||
for x := range orderbookNew.Asks {
|
||||
book.Asks[x] = orderbook.Item{
|
||||
book.Asks[x] = orderbook.Tranche{
|
||||
Amount: orderBookNew.Asks[x].Quantity,
|
||||
Price: orderBookNew.Asks[x].Price,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user