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

Confusing comment in smallerThan implementation #103

Open
josojo opened this issue Mar 31, 2021 · 0 comments
Open

Confusing comment in smallerThan implementation #103

josojo opened this issue Mar 31, 2021 · 0 comments

Comments

@josojo
Copy link
Contributor

josojo commented Mar 31, 2021

From Lasse:

For smallerThan in IterableOrderedOrderSet.sol there seem to be a mismatch between comment and the implementation, the comment says that it is ordered by: price, sellAmount and then userId, but from the implementation, it looks at the priceNumerator after the price.

While technically everything is correct, as we are sorting buy sellAmount and buyAmount (in this case of the code, we have: sellAmountLeft < sellAmountRight, if and only if buyAmountLeft < buyAmountRight) this comment is still confusing and should be corrected.

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

No branches or pull requests

1 participant