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

Merged IndexPoolMeta and PoolUpdateRecord structs and fixed references to them. Resolves #5 #7 #10 #13 #35

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

d1ll0n
Copy link
Contributor

@d1ll0n d1ll0n commented Oct 22, 2020

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

Merged IndexPoolMeta and PoolUpdateRecord into a single struct. (resolves #13)

Fixed erroneous typecast to uint8 for categoryID in prepareIndexPool. (resolves #5)

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

Set pool's last reweigh timestamp in finishPreparedIndexPool (resolves #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.

Added explanation of IndexPoolMeta struct field sizes. As mentioned in a suggestion from @cleanunicorn, it is worthwhile to explain why the struct fields have the sizes they do.

…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.
As mentioned in a suggestion from @cleanunicorn, it is worthwhile to explain why the struct fields have the sizes they do.
@d1ll0n d1ll0n added bug fix Fixed an existing bug clarity Improvements to code clarity improvement Improve an existing feature gas Improvements to gas efficiency labels Oct 22, 2020
@d1ll0n d1ll0n merged commit 5a3aaee into master Oct 26, 2020
@d1ll0n d1ll0n deleted the fix-controller-structs branch October 26, 2020 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixed an existing bug clarity Improvements to code clarity gas Improvements to gas efficiency improvement Improve an existing feature
Projects
None yet
1 participant