fixing certora/specs/GovernorCountingSimple.spec
This commit is contained in:
@ -135,12 +135,12 @@ rule noVoteForSomeoneElse(uint256 pId, uint8 sup, method f) {
|
||||
address voter = e.msg.sender;
|
||||
address user;
|
||||
|
||||
bool hasVotedBefore_User = hasVoted(e, pId, user);
|
||||
bool hasVotedBefore_User = hasVoted(pId, user);
|
||||
|
||||
castVote@withrevert(e, pId, sup);
|
||||
require(!lastReverted);
|
||||
|
||||
bool hasVotedAfter_User = hasVoted(e, pId, user);
|
||||
bool hasVotedAfter_User = hasVoted(pId, user);
|
||||
|
||||
assert user != voter => hasVotedBefore_User == hasVotedAfter_User;
|
||||
}
|
||||
@ -172,7 +172,7 @@ rule hasVotedCorrelation(uint256 pId, method f, env e, uint256 bn) {
|
||||
uint256 forBefore = votesFor();
|
||||
uint256 abstainBefore = votesAbstain();
|
||||
|
||||
bool hasVotedBefore = hasVoted(e, pId, acc);
|
||||
bool hasVotedBefore = hasVoted(pId, acc);
|
||||
|
||||
helperFunctionsWithRevert(pId, f, e);
|
||||
require(!lastReverted);
|
||||
@ -181,7 +181,7 @@ rule hasVotedCorrelation(uint256 pId, method f, env e, uint256 bn) {
|
||||
uint256 forAfter = votesFor();
|
||||
uint256 abstainAfter = votesAbstain();
|
||||
|
||||
bool hasVotedAfter = hasVoted(e, pId, acc);
|
||||
bool hasVotedAfter = hasVoted(pId, acc);
|
||||
|
||||
// want all vote categories to not decrease and at least one category to increase
|
||||
assert (!hasVotedBefore && hasVotedAfter) => (againstBefore <= againstAfter && forBefore <= forAfter && abstainBefore <= abstainAfter), "no correlation: some category decreased";
|
||||
|
||||
Reference in New Issue
Block a user