Skip to content

Conversation

@nventuro
Copy link
Contributor

The old code did error-out on out of bounds accesses, but with an invalid opcode instead of a proper revert reason.

@nventuro nventuro requested a review from frangio March 26, 2020 22:04
@nventuro
Copy link
Contributor Author

In the interest of speed I ended up also doing some internal renaming (values -> keys) on this PR, so that it can be used to build on top of when working on #2072.

Sorry if you find this too messy. Reviewing commit by commit should be fine though.

@nventuro
Copy link
Contributor Author

This ended up being a mish-mash of unrelated improvements. After experimenting with EnumerableMap, I decided that get(index) looked weird and would be better suited as get(key) -> value, so I renamed it to at(index).

@nventuro nventuro changed the title Add revert reason to EnumerableSet.get. API improvements for EnumerableSet Mar 27, 2020
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

👌

@nventuro nventuro merged commit 7415ebe into OpenZeppelin:master Mar 27, 2020
@nventuro nventuro deleted the enumerable-set-get-errors branch March 27, 2020 21:39
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