Skip to content

Commit

Permalink
Avoid the edge case where block timestamp overflows to 0 (Uniswap#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
moodysalem committed Apr 27, 2020
1 parent e0be46e commit 53eed35
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion contracts/ExampleOracleSimple.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ contract ExampleOracleSimple {
uint112 reserve1;
(reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
require(reserve0 != 0 && reserve1 != 0, 'ExampleOracleSimple: NO_RESERVES'); // ensure that there's liquidity in the pair
require(blockTimestampLast != 0, 'ExampleOracleSimple: NO_PRICE_HISTORY'); // ensure there's a price history
}

function update() external {
Expand Down

0 comments on commit 53eed35

Please sign in to comment.