diff options
author | chriseth <chris@ethereum.org> | 2018-10-24 20:51:37 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-24 20:52:55 +0800 |
commit | eded236e67d714802e62365381c6aa2588a091c5 (patch) | |
tree | 8213d65d048e33743eaefef7ad1435f5071a6146 /test/compilationTests/zeppelin/ReentrancyGuard.sol | |
parent | f5f977eaf5b57c5fbed99692eed1b6e3b0f5527f (diff) | |
download | dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.gz dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.tar.zst dexon-solidity-eded236e67d714802e62365381c6aa2588a091c5.zip |
Only run zeppelin as external tests.
Diffstat (limited to 'test/compilationTests/zeppelin/ReentrancyGuard.sol')
-rw-r--r-- | test/compilationTests/zeppelin/ReentrancyGuard.sol | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/compilationTests/zeppelin/ReentrancyGuard.sol b/test/compilationTests/zeppelin/ReentrancyGuard.sol deleted file mode 100644 index f7abb698..00000000 --- a/test/compilationTests/zeppelin/ReentrancyGuard.sol +++ /dev/null @@ -1,34 +0,0 @@ -pragma solidity ^0.4.11; - -/** - * @title Helps contracts guard against rentrancy attacks. - * @author Remco Bloemen <remco@2π.com> - * @notice If you mark a function `nonReentrant`, you should also - * mark it `external`. - */ -contract ReentrancyGuard { - - /** - * @dev We use a single lock for the whole contract. - */ - bool private rentrancy_lock = false; - - /** - * @dev Prevents a contract from calling itself, directly or indirectly. - * @notice 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 a `external` - * wrapper marked as `nonReentrant`. - */ - modifier nonReentrant() { - if(rentrancy_lock == false) { - rentrancy_lock = true; - _; - rentrancy_lock = false; - } else { - revert(); - } - } - -} |