Submitted by greiart
Reducing minObservations to uint16 will help prevent erroneous minObservations values from being set (ie. > 65535) by the owner without needing checks. Otherwise, the isPoolValid will always return false, causing reverts in calling tokenPrice and addPool functions (and other functions calling these). See L25 and L101 of UniswapV3Oracle.sol.
The maximum number of observations available is 65535 (see UniswapV3Pool.sol L39), which is equivalent to type(uint16).max.
Hence,
- talegift (Wild Credit) confirmed
