Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

orderwatch: Avoid updating orders multiple times in same txn (part 2) #623

Merged
merged 5 commits into from
Jan 9, 2020

Conversation

fabioberger
Copy link
Contributor

@fabioberger fabioberger commented Jan 6, 2020

Fixes: #608

Currently it is possible that we attempt to update orders that expire or unexpire twice within the same txn. This causes the second update to noop since our DB txns do not support multiple updates within a single txn. This PR stops this from happening.

@fabioberger fabioberger self-assigned this Jan 6, 2020
Copy link
Contributor

@albrow albrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few small suggestions, but could you also add a regression test?

CHANGELOG.md Outdated Show resolved Hide resolved
zeroex/orderwatch/order_watcher.go Show resolved Hide resolved
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

zeroex/orderwatch/order_watcher.go Show resolved Hide resolved
@albrow albrow self-requested a review January 9, 2020 22:14
@fabioberger fabioberger merged commit 75b53ac into development Jan 9, 2020
@fabioberger fabioberger deleted the fix/conflictingTxnOperations branch January 9, 2020 22:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants