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 issue with trade failures #16415

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

Quexington
Copy link
Contributor

There was a sneaky issue here where trade could get set to None and thus fail to cancel even though it had previously been identified as needing to be cancelled.

@Quexington Quexington added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Sep 25, 2023
@Quexington Quexington marked this pull request as ready for review September 25, 2023 15:24
@Quexington Quexington requested a review from a team as a code owner September 25, 2023 15:24
@arvidn
Copy link
Contributor

arvidn commented Sep 25, 2023

I think it would be good to have test coverage for this, perhaps not for the release, but in main at least

@Quexington
Copy link
Contributor Author

I think it would be good to have test coverage for this, perhaps not for the release, but in main at least

I was trying to add a test for this but the thing is, I couldn't understand why this was ever working in the first place and then I realized it had to do with the order in which the coins were processed. This is kind of random and could have happened with any number of offers and so adding a test for it now once it has been fixed doesn't really make a ton of sense, because you could shift the order of the coins around to hit this edge case but you'd be neglecting to test the case that actually runs in production and it would be a very confusing test to exist anyways due to the fix already being in place.

I think the best way to think of this is as a small "refactor" where the existing test coverage should be leaned on as the bad code was just replaced with slightly better code. Adding a test for something that is now conceptually impossible just because it was at one point doesn't make a lot of sense to me.

@wallentx wallentx closed this Sep 25, 2023
@wallentx wallentx reopened this Sep 25, 2023
@wallentx wallentx merged commit 867b550 into release/2.1.0 Sep 26, 2023
@wallentx wallentx deleted the quex.fix_trade_failures_crcats branch September 26, 2023 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants