MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / bind_checkpoint_hash

Method bind_checkpoint_hash

libatomic/src/daemon/journal_sink.rs:235–256  ·  view source on GitHub ↗
(
        &self,
        checkpoint: &JournalCheckpointAttempt,
        hash: Hash,
        session_turn: SessionTurn,
        now: i64,
    )

Source from the content-addressed store, hash-verified

233 }
234
235 fn bind_checkpoint_hash(
236 &self,
237 checkpoint: &JournalCheckpointAttempt,
238 hash: Hash,
239 session_turn: SessionTurn,
240 now: i64,
241 ) -> Result<JournalCheckpointAttempt, String> {
242 let attempt = self
243 .store()?
244 .bind_provenance_checkpoint_hash(
245 ProvenanceId::new(checkpoint.provenance_id),
246 checkpoint.attempt_generation,
247 hash,
248 session_turn,
249 now,
250 )
251 .map_err(|error| error.to_string())?;
252 Ok(to_journal_checkpoint_attempt(
253 checkpoint.provenance_id,
254 attempt,
255 ))
256 }
257
258 fn acknowledge_checkpoint(
259 &self,

Callers

nothing calls this directly

Calls 3

storeMethod · 0.45

Tested by

no test coverage detected