Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orderwatch: Update lastUpdated and fillableTakerAssetAmount for order in DB #386

Merged
merged 8 commits into from Sep 5, 2019

Conversation

@fabioberger
Copy link
Contributor

fabioberger commented Sep 3, 2019

Fixes: #190

Currently, we aren't updating an orders fillableTakerAssetAmount nor it's lastUpdated timestamp in the DB when processing a contract event impacting it unless it is being unwatched or re-watched. This PR makes it such that we always update an order's DB entry, no matter what the event so that the lastUpdated and fillableTakerAssetAmount in the DB is always accurate.

@fabioberger fabioberger self-assigned this Sep 3, 2019
@fabioberger fabioberger requested a review from albrow Sep 3, 2019
@fabioberger fabioberger force-pushed the fix/missingLastUpdatedUpdates branch from 0166385 to ab68140 Sep 3, 2019
zeroex/orderwatch/order_watcher.go Outdated Show resolved Hide resolved
@fabioberger fabioberger force-pushed the fix/missingLastUpdatedUpdates branch from ab68140 to 75268a9 Sep 4, 2019
@fabioberger fabioberger force-pushed the fix/missingLastUpdatedUpdates branch from 75268a9 to 4c04415 Sep 5, 2019
fabioberger added 3 commits Sep 5, 2019
…that no one else can modify the orders while the orders are being read and modified by this method
zeroex/orderwatch/order_watcher.go Outdated Show resolved Hide resolved
@albrow

This comment has been minimized.

Copy link
Member

albrow commented Sep 5, 2019

@fabioberger I think you meant to pass the transaction through to generateOrderEventsIfChanged?

…lso encompasses the order reads, not just the writes
@fabioberger fabioberger force-pushed the fix/missingLastUpdatedUpdates branch from 03d8783 to 15b83b8 Sep 5, 2019
@albrow
albrow approved these changes Sep 5, 2019
@albrow albrow merged commit b7d845a into development Sep 5, 2019
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
Details
@albrow albrow deleted the fix/missingLastUpdatedUpdates branch Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.