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

chrono deprecations warning cleanup #3759

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

yeastplume
Copy link
Member

@yeastplume yeastplume commented Jun 20, 2023

Cleans up warnings related to specific errors, mostly from_timestamp moving to a from_timestamp_opt function that returns an options.

Note from_timestamp_opt returns None in the following circumstances:

Returns None on the out-of-range number of seconds (more than 262 000 years away from common era) and/or invalid nanosecond (2 seconds or more).
  • Where timestamps are hardcoded on initialization (such as being hardcoded with 0s), I've just called unwrap as there's no reason for the function to return None
  • Where timestamps are initialized dynamically in critical code check for None and return appropriate error
  • where timestamps are less crucial, (tui, mining) just unwrap_or_default

@yeastplume
Copy link
Member Author

6 Month re-review: think all of these are fine. PIBD is released and master set to an alpha so good time to integrate these.

@yeastplume yeastplume merged commit d1b7ae5 into mimblewimble:master Jan 29, 2024
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 23, 2024
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