Просмотр исходного кода

Revert memory pointer to storage pointer (#4550)

Francisco 2 лет назад
Родитель
Сommit
3266bca150
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      contracts/governance/extensions/GovernorVotesQuorumFraction.sol

+ 1 - 1
contracts/governance/extensions/GovernorVotesQuorumFraction.sol

@@ -49,7 +49,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes {
         uint256 length = _quorumNumeratorHistory._checkpoints.length;
 
         // Optimistic search, check the latest checkpoint
-        Checkpoints.Checkpoint208 memory latest = _quorumNumeratorHistory._checkpoints[length - 1];
+        Checkpoints.Checkpoint208 storage latest = _quorumNumeratorHistory._checkpoints[length - 1];
         uint48 latestKey = latest._key;
         uint208 latestValue = latest._value;
         if (latestKey <= timepoint) {