Skip to content

fix(netwatch)!: add last_updated#104

Merged
dignifiedquire merged 3 commits intomainfrom
add-last-updated
Mar 4, 2026
Merged

fix(netwatch)!: add last_updated#104
dignifiedquire merged 3 commits intomainfrom
add-last-updated

Conversation

@dignifiedquire
Copy link
Contributor

Based on #103

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/net-tools/pr/104/docs/net_tools/

Last updated: 2026-03-04T09:15:26Z

@matheus23 matheus23 changed the title fix(netwatch!: add last_updated fix(netwatch)!: add last_updated Feb 26, 2026
@n0bot n0bot bot added this to iroh Feb 26, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Feb 26, 2026
@matheus23
Copy link
Member

Can I interest you in a

pub struct WithTimestamp<T> {
    #[deref_mut]
    inner: T,
    last_updated: Instant,
}

?

Copy link
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

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

I still don't like how this PR duplicates Eq partially. It seems error-prone to me.

I have another proposal for how to fix this, instead of a last_updated timestamp, how about a last_unsuspend_detected: Instant? I think this would make the whole logic a lot cleaner and might even help consumers of this API understand if they need to/want to handle such changes, unlike mysteriously having the last_updated changing without any actual changes.

@github-project-automation github-project-automation bot moved this from 🚑 Needs Triage to 🏗 In progress in iroh Mar 3, 2026
@dignifiedquire
Copy link
Contributor Author

how/when would this be set?

@matheus23
Copy link
Member

In the netmon actor, in check_wall_time_advance()

@dignifiedquire
Copy link
Contributor Author

@matheus23 updated

@dignifiedquire dignifiedquire merged commit b46a82d into main Mar 4, 2026
25 of 27 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Mar 4, 2026
@dignifiedquire dignifiedquire deleted the add-last-updated branch March 4, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants