Add ReentrancyGuard status getter (#3714)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -23,6 +23,14 @@ contract('ReentrancyGuard', function (accounts) {
|
||||
this.reentrancyMock.countAndCall(attacker.address), 'ReentrancyAttack: failed call');
|
||||
});
|
||||
|
||||
it('_reentrancyGuardEntered should be true when guarded', async function () {
|
||||
await this.reentrancyMock.guardedCheckEntered();
|
||||
});
|
||||
|
||||
it('_reentrancyGuardEntered should be false when unguarded', async function () {
|
||||
await this.reentrancyMock.unguardedCheckNotEntered();
|
||||
});
|
||||
|
||||
// The following are more side-effects than intended behavior:
|
||||
// I put them here as documentation, and to monitor any changes
|
||||
// in the side-effects.
|
||||
|
||||
Reference in New Issue
Block a user