Skip to content
Prev Previous commit
Next Next commit
Merge branch 'master' into next/storage-packing/Governor
  • Loading branch information
Amxx authored Jun 13, 2023
commit ab9289356baceef6eb8f512c571bf8e341dbf1ce
6 changes: 5 additions & 1 deletion contracts/governance/Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,11 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receive
string memory reason,
bytes memory params
) internal virtual returns (uint256) {
require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active");
ProposalCore storage proposal = _proposals[proposalId];
ProposalState currentState = state(proposalId);
if (currentState != ProposalState.Active) {
revert GovernorUnexpectedProposalState(proposalId, currentState, _encodeStateBitmap(ProposalState.Active));
}

uint256 weight = _getVotes(account, proposalSnapshot(proposalId), params);
_countVote(proposalId, account, support, weight, params);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.