Crowdsale.buyTokens is now nonReentrant. (#1438)

(cherry picked from commit 6d415c508b)
This commit is contained in:
Nicolás Venturo
2018-10-19 17:42:20 -03:00
committed by Leo Arias
parent ecae7608f9
commit 1a4009f817
2 changed files with 9 additions and 7 deletions

View File

@ -19,11 +19,10 @@ contract ReentrancyGuard {
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* If you mark a function `nonReentrant`, you should also
* mark it `external`. Calling one `nonReentrant` function from
* another is not supported. Instead, you can implement a
* `private` function doing the actual work, and an `external`
* wrapper marked as `nonReentrant`.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_guardCounter += 1;