The additional check you added to the staleCheckLatestRoundData function checks if the updatedAt variable is equal to 0 or if the answeredInRound variable is less than the roundId variable. If either of these conditions is true, the function will revert with the OracleLib__StalePrice error..
In libraries/OracleLib.sol =>
Add below code, to do staleCheckLatestRoundData =>
if (updatedAt == 0 || answeredInRound < roundId) {
revert OracleLib__StalePrice();
}
This means that if the data from the Chainlink Oracle is not up-to-date or if the latest round of data has not been answered yet, the function will revert and prevent further execution.
Manual Review
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.