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: fix bug in FindAllRoutes #173

Merged
merged 1 commit into from
Aug 9, 2023
Merged

fix: fix bug in FindAllRoutes #173

merged 1 commit into from
Aug 9, 2023

Conversation

kingcre
Copy link
Contributor

@kingcre kingcre commented Aug 8, 2023

Description

There was a bug in FindAllRoutes - when there's two markets for same base/quote coin pair(e.g. bCRE/CRE and CRE/bCRE at the same time), FindAllRoutes would include only one of those markets in the result.

This PR fixes the bug by making the denomMap to have arrays of market ids instead of single market ids.

@kingcre kingcre self-assigned this Aug 8, 2023
@kingcre kingcre marked this pull request as ready for review August 8, 2023 07:24
Copy link
Member

@crypin crypin left a comment

Choose a reason for hiding this comment

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

In simulation make test-sim-after-import, there seems to be a case of looping for more than 2 hours in the findMsgPlaceMarketOrderParams part

go test -mod=readonly ./app -run TestAppSimulationAfterImport -Enabled=true -NumBlocks=2 -Genesis= -Verbose=true -Commit=true -Seed=424254581 -Period=2

@kingcre
Copy link
Contributor Author

kingcre commented Aug 8, 2023

@crypin Yes I was facing the same problem. I think it's related to market orders, so I'll resolve it in a separate PR.
See #174

@crypin crypin self-requested a review August 8, 2023 16:36
@kingcre kingcre merged commit 5fd1c67 into amm-module Aug 9, 2023
@kingcre kingcre deleted the fix-swap-routes branch August 22, 2023 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants