Skip to content

Commit

Permalink
fix: correctly persist states based on configured epoch frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Sep 21, 2023
1 parent f77b774 commit d988974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/chain/archiver/archiveStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class StatesArchiver {
const lastStoredEpoch = computeEpochAtSlot(lastStoredSlot ?? 0);
const {archiveStateEpochFrequency} = this.opts;

if (finalized.epoch - lastStoredEpoch > Math.min(PERSIST_TEMP_STATE_EVERY_EPOCHS, archiveStateEpochFrequency)) {
if (finalized.epoch - lastStoredEpoch >= Math.min(PERSIST_TEMP_STATE_EVERY_EPOCHS, archiveStateEpochFrequency)) {
await this.archiveState(finalized);

// Only check the current and previous intervals
Expand Down

0 comments on commit d988974

Please sign in to comment.