historical-price-feed-data icon indicating copy to clipboard operation
historical-price-feed-data copied to clipboard

Can't we just verify with only 2 calls to getRoundData()?

Open Raunaque97 opened this issue 2 years ago • 1 comments

timeStamp1, timeStamp2 are timestamp of 2 consecutive rounds. verify, timeStamp1<= requested Timestamp <= timeStamp2 we will also verify whether the rounds ids provided are consecutive rounds by decoding the ids into phaseId and roundId. Assuming roundIds start with 1 when phaseId increments it can also be easily done.

What am I missing here?

Raunaque97 avatar Sep 15 '22 14:09 Raunaque97

Hi, thanks so much for raising. hmmm yes it may be possible to reduce the number of calls to getRoundata. But i thought we would need at least 3 calls, one per round? because the targetRound/answerRound is the correct answer right, then the one before and after are used/needed to verify that there isn't a round thats closer to what was being searched

pappas999 avatar Sep 16 '22 06:09 pappas999