fix initialization of ReetrancyGuard storage variable

This commit is contained in:
Francisco Giordano
2018-10-03 17:27:41 -03:00
parent 32d0f6770c
commit 3c4528b8f4
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,6 @@
pragma solidity ^0.4.24;
import "../Initializable.sol";
/**
* @title Helps contracts guard against reentrancy attacks.
@ -7,10 +8,14 @@ pragma solidity ^0.4.24;
* @dev If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard {
contract ReentrancyGuard is Initializable {
/// @dev counter to allow mutex lock with only one SSTORE operation
uint256 private _guardCounter = 1;
uint256 private _guardCounter;
function initialize() public initializer {
_guardCounter = 1;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.