Skip to content

Commit

Permalink
Fix audit #GAS-04
Browse files Browse the repository at this point in the history
Simplify comparison with boolean literal
  • Loading branch information
cwsnt committed Nov 22, 2021
1 parent d18a2b0 commit 61000d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/governance/GovernorAlpha.sol
Expand Up @@ -463,7 +463,7 @@ contract GovernorAlpha is SafeMath96 {
require(state(proposalId) == ProposalState.Active, "GovernorAlpha::_castVote: voting is closed");
Proposal storage proposal = proposals[proposalId];
Receipt storage receipt = proposal.receipts[voter];
require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted");
require(!receipt.hasVoted, "GovernorAlpha::_castVote: voter already voted");
uint96 votes = staking.getPriorVotes(voter, proposal.startBlock, proposal.startTime);
if (support) {
Expand Down

0 comments on commit 61000d8

Please sign in to comment.