You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However in ReentrancyGuardTransientUpgradeable the initial value will be 0 or false.
Also _status isn't present in the code.
Suggested solution
Consider changing the code to something like:
-// On the first call to nonReentrant, _status will be NOT_ENTERED+// On the first call to nonReentrant, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false
🔢 Code to reproduce bug
NA
The text was updated successfully, but these errors were encountered:
A comment at function
_nonReentrantBefore()
inReentrancyGuardTransientUpgradeable
is misleading.💻 Environment
ReentrancyGuardTransientUpgradeable.sol
Latest version of the code, also present in release-v5.2
📝 Details
The following comment is present in ReentrancyGuardTransientUpgradeable.sol#L47:
// On the first call to nonReentrant, _status will be NOT_ENTERED
As everyone knows,
NOT_ENTERED
has the value of 1, see ReentrancyGuardUpgradeable.sol#L38:However in
ReentrancyGuardTransientUpgradeable
the initial value will be 0 orfalse
.Also
_status
isn't present in the code.Suggested solution
Consider changing the code to something like:
🔢 Code to reproduce bug
NA
The text was updated successfully, but these errors were encountered: