Skip to content

Conversation

@YichiZhang0613
Copy link

@YichiZhang0613 YichiZhang0613 commented Nov 26, 2025

The inconsistency among comment, code and assertion cause confusion here, which should be fixed.
The assumption("ASSUMPTION: our validity period is AT LEAST 2 days") indicates that TICKETBOOK_VALIDITY_DAYS >= 2 days, which indicates TICKETBOOK_VALIDITY_DAYS - 1 >= 1 day. So target_secs should be >= 86400.
The comment will cause the confusion("making sure it's no greater than 1 day"). It indicate that it should be <= 86400, which is wrong semantically and should be changed it into "no lower than 1 day".
The assertion message requires target_secs >= 86400("no lower than"), while the predicate is target_secs > 86400, so I changed it into assert!(target_secs >= 86400,"the maximum time between redemption can't be lower than 1 day!");.


This change is Reviewable

@vercel
Copy link

vercel bot commented Nov 26, 2025

@YichiZhang0613 is attempting to deploy a commit to the nyx-network Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thank you for making this first PR

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

Successfully merging this pull request may close these issues.

1 participant