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

Function bind_checkpoint_hash

libatomic/src/daemon/provenance_core.rs:321–334  ·  view source on GitHub ↗

Bind the prepared graph hash and exact immutable session turn once.

(
    store: &RedbChangeStore,
    id: ProvenanceId,
    expected_generation: u64,
    hash: atomic_core::types::Hash,
    session_turn: atomic_core::change::session::SessionTurn,
    now: i64,
)

Source from the content-addressed store, hash-verified

319
320/// Bind the prepared graph hash and exact immutable session turn once.
321pub fn bind_checkpoint_hash(
322 store: &RedbChangeStore,
323 id: ProvenanceId,
324 expected_generation: u64,
325 hash: atomic_core::types::Hash,
326 session_turn: atomic_core::change::session::SessionTurn,
327 now: i64,
328) -> Result<ProvenanceCheckpointAttempt, JournalError> {
329 let attempt = store
330 .bind_provenance_checkpoint_hash(id, expected_generation, hash, session_turn, now)
331 .map_err(|error| JournalError::store(ErrorCode::ProvenanceCheckpoint, error))?;
332 owner_failpoint("after-checkpoint-bind");
333 Ok(attempt)
334}
335
336/// Acknowledge publication and complete the turn (caller-supplied time).
337pub fn acknowledge_checkpoint(

Callers 1

Calls 3

storeFunction · 0.85
owner_failpointFunction · 0.85

Tested by

no test coverage detected