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

fix(iroh): add timestamp method to Entry RPC struct #1949

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

b5
Copy link
Member

@b5 b5 commented Jan 12, 2024

Description

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

@b5 b5 marked this pull request as ready for review January 12, 2024 02:53
@@ -871,6 +871,11 @@ impl Entry {
self.0.key()
}

/// Get the timestamp of this entry.
pub fn timestamp(&self) -> u64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm rather sad this comes as a u64. Perhaps that's already a mistake in iroh-sync? Or just implementation details leaking out? But for a user-level Rust API I'd much rather see something like time::OffsetDateTime or so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already use u64s for timestamps in the whole codebase, lets ship this as is, and improve on that later

@dignifiedquire dignifiedquire merged commit 0084b5f into main Jan 15, 2024
18 checks passed
@dignifiedquire dignifiedquire deleted the b5/fix_entry_rpc_timestamp branch January 15, 2024 18:34
fubuloubu pushed a commit to ApeWorX/iroh that referenced this pull request Feb 21, 2024
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants