Skip to content

Commit 9109d98

Browse files
committed
feat: remove usage of lastCountedEpoch
1 parent 8b3670e commit 9109d98

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/GovernanceAttacks.t.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,12 @@ contract GovernanceTest is Test {
217217

218218
(Governance.VoteSnapshot memory v, Governance.InitiativeVoteSnapshot memory initData) = governance.snapshotVotesForInitiative(address(maliciousInitiative2));
219219
uint256 currentEpoch = governance.epoch();
220-
assertEq(initData.lastCountedEpoch, currentEpoch - 1, "Epoch Matches");
221-
220+
222221
// Inactive for 4 epochs
223222
// Add another proposal
224223

225224
vm.warp(block.timestamp + governance.EPOCH_DURATION() * 5); /// @audit needs 5?
226225
(v, initData) = governance.snapshotVotesForInitiative(address(maliciousInitiative2));
227-
assertEq(initData.lastCountedEpoch, currentEpoch - 1, "Epoch Matches"); /// @audit This fails if you have 0 votes, see QA
228-
229226
uint256 unregisterSnapshot = vm.snapshot();
230227

231228
maliciousInitiative2.setRevertBehaviour(MaliciousInitiative.FunctionType.UNREGISTER, MaliciousInitiative.RevertType.THROW);

0 commit comments

Comments
 (0)