Marketmaker cancel bug workaround#485
Merged
Merged
Conversation
a176aba to
a2f5e7e
Compare
6d5d9d4 to
eb21456
Compare
eb21456 to
cb15fbf
Compare
kevva
approved these changes
Aug 29, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends #484. Just targeting the #484 branch for now so you can easily see what's changed in the diff/commits. If we decide to merge this it should be merged into master after #484. Even if #484 isn't merged, this will still likely be useful for #481.
This ignores cancel events sent over the socket by mm if the swap is in progress. An in-progress swap can't be cancelled, they are sent in error by mm. Relevent bug (jl777/SuperNET#956).
I have done some testing and this appears to be working for me. I made the following swap which caused mm to incorrectly send failed events:
https://gist.github.com/lukechilds/b348cd594fab918c2bdd13b7e002ac5e
The changes I've made to the swap object formatting logic ignored the cancel events in this specific scenario and the UI displayed correctly throughout the entire swap.
This is a bit of a dirty hack but it should be ok until the bug is resolved in mm. I've only done some light testing so would advise testing this a bit more extensively before merging.