Browse Source

fixed function revert if executed

Michael M 3 years ago
parent
commit
53d4006806
1 changed files with 7 additions and 1 deletions
  1. 7 1
      certora/specs/GovernorBase.spec

+ 7 - 1
certora/specs/GovernorBase.spec

@@ -61,7 +61,13 @@ invariant cannotSetIfCanceled(uint256 pId)
  * No functions should be allowed to run after a job is deemed as executed
  */
 invariant cannotSetIfExecuted(uint256 pId)
-    isExecuted(pId) => lastReverted == true
+    isExecuted(pId) => lastReverted == true 
+    {
+        preserved execute(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) with (env e)
+        {
+            require(isExecuted(pId));
+        }
+    }