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

fix(orderbook): add back fully matched orders #1830

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

sangaman
Copy link
Collaborator

This fixes the functionality of non-strict mode to add peer orders back to the order book after they were matched but failed to swap. Previously we would only add back orders that were partially matched, by removing the remaining order from the order book, adding the partially matched quantity back to it, and then adding it back to the order book.

This also adds back orders that were fully matched and removed from the order book during matching after they fail to swap.

Closes #1816.

@sangaman sangaman added bug Something isn't working order book labels Aug 23, 2020
@sangaman sangaman requested review from a user and raladev August 23, 2020 03:27
@sangaman sangaman self-assigned this Aug 23, 2020
ghost
ghost previously approved these changes Aug 24, 2020
@sangaman
Copy link
Collaborator Author

Hmm I have to see why the one simulation test is failing, I'll try to figure it out shortly.

This fixes the functionality of non-strict mode to add peer orders back
to the order book after they were matched but failed to swap. Previously
we would only add back orders that were partially matched, by removing
the remaining order from the order book, adding the partially matched
quantity back to it, and then adding it back to the order book.

This also adds back orders that were fully matched and removed from the
order book during matching after they fail to swap.

Closes #1816.
@sangaman sangaman force-pushed the add-back-fully-matched-orders branch from c982bef to 1024b72 Compare August 24, 2020 15:51
@sangaman
Copy link
Collaborator Author

It was an issue with trying to add back an order for a peer that we had disconnected from during matching, I made sure we simply discard the order without an error in such a case.

@sangaman sangaman merged commit b1da4bf into master Aug 24, 2020
@sangaman sangaman deleted the add-back-fully-matched-orders branch August 24, 2020 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working order book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order is not returned back to order book of taker after no route err
1 participant