historical-price-feed-data
historical-price-feed-data copied to clipboard
Can't we just verify with only 2 calls to getRoundData()?
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?
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