mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-20 15:10:10 +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:
@@ -87,7 +87,7 @@ func (w *Orderbook) validate(u *orderbook.Update) error {
|
||||
}
|
||||
|
||||
// Update updates a stored pointer to an orderbook.Depth struct containing a
|
||||
// linked list, this switches between the usage of a buffered update
|
||||
// bid and ask Tranches, this switches between the usage of a buffered update
|
||||
func (w *Orderbook) Update(u *orderbook.Update) error {
|
||||
if err := w.validate(u); err != nil {
|
||||
return err
|
||||
@@ -304,7 +304,7 @@ func (o *orderbookHolder) updateByIDAndAction(updts *orderbook.Update) error {
|
||||
|
||||
// LoadSnapshot loads initial snapshot of orderbook data from websocket
|
||||
func (w *Orderbook) LoadSnapshot(book *orderbook.Base) error {
|
||||
// Checks if book can deploy to linked list
|
||||
// Checks if book can deploy to depth
|
||||
err := book.Verify()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user