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 erroneous typecast in prepareIndexPool on MarketCapSqrtController.sol #5

Closed
d1ll0n opened this issue Oct 11, 2020 · 0 comments · Fixed by #35
Closed

Fix erroneous typecast in prepareIndexPool on MarketCapSqrtController.sol #5

d1ll0n opened this issue Oct 11, 2020 · 0 comments · Fixed by #35
Assignees
Labels
bug Something isn't working

Comments

@d1ll0n
Copy link
Contributor

d1ll0n commented Oct 11, 2020

Fix mistake found by @cleanunicorn

L196 - uint8(categoryID) should be uint16(categoryID)

@d1ll0n d1ll0n added the bug Something isn't working label Oct 11, 2020
@d1ll0n d1ll0n self-assigned this Oct 11, 2020
@d1ll0n d1ll0n changed the title Fix bug on MarketCapSqrtController.sol:L196 Fix erroneous typecast in prepareIndexPool on MarketCapSqrtController.sol Oct 11, 2020
d1ll0n added a commit that referenced this issue Oct 13, 2020
Fixed bad typecast in MarketCapSqrtController.sol . Function was casting categoryID to a uint8 when it should be a uint16.
d1ll0n added a commit that referenced this issue Oct 22, 2020
…th the way they were used. | Resolves #5 #7 #10 #13

Made all of these changes as a single PR since they are related to the use of the structs which were modified.

Fixed erroneous typecast to uint8 for categoryID in . #5

Merged IndexPoolMeta and PoolUpdateRecord into a single struct. #13

Replaced  function with modifier of the same name. Replaced references in all functions that used it except for , which already has access to the struct. #7

Set pool's last reweigh timestamp in  #10

Modified order of execution to apply storage updates to meta prior to calling reweigh and reindex. This is unlikely to be an issue due to the fact that the pool is always an approved implementation, but there's no efficiency impact so to stay on the safe side I switched the order.
d1ll0n added a commit that referenced this issue Oct 26, 2020
Merged IndexPoolMeta and PoolUpdateRecord structs and fixed references to them. Resolves #5 #7 #10 #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant