Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is no constant name MAXIMUM_FRESH_DURATION_SECONDS #1

Open
sanjsingh07 opened this issue Oct 7, 2023 · 2 comments
Open

there is no constant name MAXIMUM_FRESH_DURATION_SECONDS #1

sanjsingh07 opened this issue Oct 7, 2023 · 2 comments

Comments

@sanjsingh07
Copy link

sanjsingh07 commented Oct 7, 2023

so this specific function quest is supposed to be aborted if the price is stale while checking time against the constant called MAXIMUM_FRESH_DURATION_SECONDS but since there is no MAXIMUM_FRESH_DURATION_SECONDS you either have to disable the stale check which further results in the failed test case, I've attached image which show the specific failed test case

 /*
Returns the latest price as long as it is attested within the default maximum attestation
duration. The default maximum attestation duration is defined by the
MAXIMUM_FRESH_DURATION_SECONDS constant. Abort if the price is stale or if the pair does
not exist.
@param pair - id of the coin pair being updated
@return - the price of the pair along with the confidence
*/
public fun get_price(pair: String): Price acquires PriceBoard {

so tell me how should I proceed with this?

also already created this issue in a private repo assigned to me, creating this one here just so we can be consistent.

image

@Annongkhanh
Copy link

Default MAXIMUM_FRESH_DURATION_SECONDS is 3 hours. I found it while reading the description.

@sanjsingh07
Copy link
Author

yup! I'm aware of it, I created this ticket so I can create a pull request and point it to this issue for further explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants