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

@nonreentrant should not compile on constant functions #1544

Closed
haydenadams opened this issue Jul 23, 2019 · 3 comments · Fixed by #1550
Closed

@nonreentrant should not compile on constant functions #1544

haydenadams opened this issue Jul 23, 2019 · 3 comments · Fixed by #1550
Labels
bug

Comments

@haydenadams
Copy link

@haydenadams haydenadams commented Jul 23, 2019

Right now this compiles:

@public
@constant
@nonreentrant('lock')
def tokenAddress() -> address:
    return self.token

however reentrancy should never be a problem in constant functions

@jacqueswww

This comment has been minimized.

Copy link
Collaborator

@jacqueswww jacqueswww commented Jul 24, 2019

Agreed, this should be a compiler error.

@jacqueswww jacqueswww added the bug label Jul 24, 2019
@davesque

This comment has been minimized.

Copy link
Contributor

@davesque davesque commented Jul 24, 2019

I'm currently looking into this. Will try to have a PR in next day or so.

@davesque

This comment has been minimized.

Copy link
Contributor

@davesque davesque commented Jul 24, 2019

Actually, this is a pretty easy fix. PR incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.