delta / dalal-street-server

Server for Pragyan's Dalal Street
72 stars 16 forks source link

[General] Prod Hot Fix #248

Closed akspi closed 5 years ago

akspi commented 5 years ago

There were a couple of changes made last year which is now on a separate branch. We need to move those to master.

gauthamk97 commented 5 years ago

There still seems to be something in prod-hotfixes that we haven't taken a look at yet. It's a hack that apparently prevents an integer wraparound in Market Depth (https://github.com/delta/dalal-street-server/commit/670a03f73f82b6755f5c92f92ec1e4a444400179) :-

// IMPORTANT: This needs to be inspected and fixed // Without this hack, we get an unsigned integer wraparound in Market Depth if stockQuantity > mds.askDepth[price] { l.Errorf("%d stockQuantity, %d price, %b isAsk, %b isMarket", stockQuantity, price, isAsk, isMarket) stockQuantity = mds.askDepth[price] }

akspi commented 5 years ago

@gauthamk97 can you take care of all the remaining hotfixes? Should make sure we don't face the same bugs that we faced last year.