Skip to content

Commit

Permalink
fixup! refactor(swing-store): Consolidate common behavior for span ro…
Browse files Browse the repository at this point in the history
…llover and stopUsingTranscript
  • Loading branch information
gibson042 committed Sep 11, 2024
1 parent 723f36b commit e26cbb2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/swing-store/src/transcriptStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,16 @@ export function makeTranscriptStore(
WHERE vatID = ? AND position >= ? AND position < ?
`);

/**
* Finalize a span, setting isCurrent to null, marking the resulting record
* for export, and effecting disk archival and database cleanup as
* configured.
* Note that creation of a new DB row and removal/replacement of the
* transcript.${vatID}.current export record are responsibility of the caller.
*
* @param {string} vatID
* @param {ReturnType<getCurrentSpanBounds>} bounds
*/
function closeSpan(vatID, bounds) {
ensureTxn();
const { startPos, endPos, hash, incarnation } = bounds;
Expand Down

0 comments on commit e26cbb2

Please sign in to comment.