Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
207b92f6
Unverified
Commit
207b92f6
authored
Dec 20, 2017
by
Francisco Giordano
Committed by
GitHub
Dec 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #602 from nemild/patch-1
Consistent spellings of reentrant
parents
ddcae625
161f25fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ReentrancyGuard.sol
contracts/ReentrancyGuard.sol
+5
-5
No files found.
contracts/ReentrancyGuard.sol
View file @
207b92f6
pragma solidity ^0.4.18;
pragma solidity ^0.4.18;
/**
/**
* @title Helps contracts guard agains rentrancy attacks.
* @title Helps contracts guard agains re
e
ntrancy attacks.
* @author Remco Bloemen <remco@2π.com>
* @author Remco Bloemen <remco@2π.com>
* @notice If you mark a function `nonReentrant`, you should also
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`.
* mark it `external`.
...
@@ -11,7 +11,7 @@ contract ReentrancyGuard {
...
@@ -11,7 +11,7 @@ contract ReentrancyGuard {
/**
/**
* @dev We use a single lock for the whole contract.
* @dev We use a single lock for the whole contract.
*/
*/
bool private rentrancy_lock = false;
bool private re
e
ntrancy_lock = false;
/**
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* @dev Prevents a contract from calling itself, directly or indirectly.
...
@@ -22,10 +22,10 @@ contract ReentrancyGuard {
...
@@ -22,10 +22,10 @@ contract ReentrancyGuard {
* wrapper marked as `nonReentrant`.
* wrapper marked as `nonReentrant`.
*/
*/
modifier nonReentrant() {
modifier nonReentrant() {
require(!rentrancy_lock);
require(!re
e
ntrancy_lock);
rentrancy_lock = true;
re
e
ntrancy_lock = true;
_;
_;
rentrancy_lock = false;
re
e
ntrancy_lock = false;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment