Skip to content

Commit

Permalink
refactor(cosmic-swingset): Clarify keep{Snapshots,Transcripts} determ…
Browse files Browse the repository at this point in the history
…ination
  • Loading branch information
gibson042 committed Sep 6, 2024
1 parent 2299579 commit f61c1c1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/cosmic-swingset/src/chain-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,12 @@ export default async function main(progname, args, { env, homedir, agcc }) {
validateSwingsetConfig(swingsetConfig);
const { slogfile, vatSnapshotRetention, vatTranscriptRetention } =
swingsetConfig;
const keepSnapshots =
vatSnapshotRetention === 'debug' ||
(!vatSnapshotRetention && ['1', 'true'].includes(XSNAP_KEEP_SNAPSHOTS));
const keepTranscripts = vatTranscriptRetention === 'archival';
const keepSnapshots = vatSnapshotRetention
? vatSnapshotRetention !== 'operational'
: ['1', 'true'].includes(XSNAP_KEEP_SNAPSHOTS);
const keepTranscripts = vatTranscriptRetention
? vatTranscriptRetention !== 'operational'
: false;

// As a kludge, back-propagate selected configuration into environment variables.
// eslint-disable-next-line dot-notation
Expand Down

0 comments on commit f61c1c1

Please sign in to comment.