MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / last_seen

Method last_seen

nodedb-crdt/src/signing.rs:131–137  ·  view source on GitHub ↗

Return the current last_seen seq_no for a device, or 0 if unknown.

(&self, user_id: u64, device_id: u64)

Source from the content-addressed store, hash-verified

129
130 /// Return the current last_seen seq_no for a device, or 0 if unknown.
131 pub fn last_seen(&self, user_id: u64, device_id: u64) -> u64 {
132 self.inner
133 .lock()
134 .ok()
135 .and_then(|g| g.get(&(user_id, device_id)).map(|s| s.last_seq_no))
136 .unwrap_or(0)
137 }
138}
139
140/// Signs deltas with a per-device HMAC-SHA256 key derived via HKDF.

Callers

nothing calls this directly

Calls 3

lockMethod · 0.80
okMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected