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

check condition first, then change state #84

Open
rstormsf opened this issue Nov 13, 2017 · 1 comment
Open

check condition first, then change state #84

rstormsf opened this issue Nov 13, 2017 · 1 comment

Comments

@rstormsf
Copy link
Contributor

https://github.com/TokenMarketNet/ico/blob/master/contracts/CrowdsaleBase.sol#L250

I believe that the check that if the contract is finalizeAgent should be done first and only then to modify state variable

  function setFinalizeAgent(FinalizeAgent addr) onlyOwner {
    require(addr.isFinalizeAgent());
    finalizeAgent = addr;
  }
@tomericco
Copy link

tomericco commented Mar 15, 2018

Why does it matter, if the tx is being reverted if the check fails?

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

2 participants