Skip to content

Commit 3af8bce

Browse files
committed
remove relic of dvp estimation in quorum calc
1 parent d68b715 commit 3af8bce

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/L2ArbitrumGovernor.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,8 @@ contract L2ArbitrumGovernor is
130130

131131
/// @notice Get total delegated votes minus excluded votes
132132
function getPastTotalDelegatedVotes(uint256 blockNumber) public view returns (uint256) {
133-
uint256 excluded = token.getPastVotes(EXCLUDE_ADDRESS, blockNumber);
134-
uint256 totalDvp = L2ArbitrumToken(address(token)).getTotalDelegationAt(blockNumber);
135-
136-
// it is possible (but unlikely) that excluded > totalDvp
137-
// this is because getTotalDelegationAt is initially an _estimate_ of the total delegation
138-
return totalDvp > excluded ? totalDvp - excluded : 0;
133+
return L2ArbitrumToken(address(token)).getTotalDelegationAt(blockNumber)
134+
- token.getPastVotes(EXCLUDE_ADDRESS, blockNumber);
139135
}
140136

141137
/// @notice Calculates the quorum size, excludes token delegated to the exclude address

0 commit comments

Comments
 (0)