浏览代码

RemovedInsertedBugForSumRule

Aleksander Kryukov 4 年之前
父节点
当前提交
6ac85d8d15
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      certora/specs/GovernorBase.spec
  2. 1 1
      contracts/governance/extensions/GovernorCountingSimple.sol

+ 1 - 1
certora/specs/GovernorBase.spec

@@ -147,7 +147,7 @@ rule immutableFieldsAfterProposalCreation(uint256 pId, method f) {
 }
 }
 
 
 /**
 /**
-* Check if it's possible to vote two time. Relevant to GovernorCountingSimpleHarness.sol contract
+* A user cannot vote twice
 */
 */
 rule doubleVoting(uint256 pId, uint8 sup) {
 rule doubleVoting(uint256 pId, uint8 sup) {
     env e;
     env e;

+ 1 - 1
contracts/governance/extensions/GovernorCountingSimple.sol

@@ -97,7 +97,7 @@ abstract contract GovernorCountingSimple is Governor {
         } else if (support == uint8(VoteType.For)) {
         } else if (support == uint8(VoteType.For)) {
             proposalvote.forVotes += weight;
             proposalvote.forVotes += weight;
         } else if (support == uint8(VoteType.Abstain)) {
         } else if (support == uint8(VoteType.Abstain)) {
-     //       proposalvote.abstainVotes += weight;
+            proposalvote.abstainVotes += weight;
         } else {
         } else {
             revert("GovernorVotingSimple: invalid value for enum VoteType");
             revert("GovernorVotingSimple: invalid value for enum VoteType");
         }
         }