Skip to content

Commit b17f8a5

Browse files
committed
Address PR comments
1 parent 9312ffa commit b17f8a5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

contracts/utils/ReentrancyGuard.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ abstract contract ReentrancyGuard {
8282

8383
function _nonReentrantBefore() private {
8484
// On the first call to nonReentrant, _status will be NOT_ENTERED
85-
if (_status == ENTERED) {
86-
revert ReentrancyGuardReentrantCall();
87-
}
85+
_nonReentrantBeforeView();
8886

8987
// Any calls to nonReentrant after this point will fail
9088
_status = ENTERED;

contracts/utils/ReentrancyGuardTransient.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ abstract contract ReentrancyGuardTransient {
5858

5959
function _nonReentrantBefore() private {
6060
// On the first call to nonReentrant, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false
61-
if (_reentrancyGuardEntered()) {
62-
revert ReentrancyGuardReentrantCall();
63-
}
61+
_nonReentrantBeforeView();
6462

6563
// Any calls to nonReentrant after this point will fail
6664
REENTRANCY_GUARD_STORAGE.asBoolean().tstore(true);

0 commit comments

Comments
 (0)