diff --git a/packages/beacon-node/src/chain/archiver/archiver.ts b/packages/beacon-node/src/chain/archiver/archiver.ts index 6d5be3445eb2..6d54a7f64911 100644 --- a/packages/beacon-node/src/chain/archiver/archiver.ts +++ b/packages/beacon-node/src/chain/archiver/archiver.ts @@ -64,7 +64,7 @@ export class Archiver { /** Archive latest finalized state */ async persistToDisk(): Promise { - return this.statesArchiverStrategy.maybeArchiveState(this.chain.forkChoice.getFinalizedCheckpoint()); + return this.statesArchiverStrategy.archiveState(this.chain.forkChoice.getFinalizedCheckpoint()); } private onFinalizedCheckpoint = async (finalized: CheckpointWithHex): Promise => { diff --git a/packages/beacon-node/src/chain/archiver/interface.ts b/packages/beacon-node/src/chain/archiver/interface.ts index 283fef579024..4c9eb27ecbdc 100644 --- a/packages/beacon-node/src/chain/archiver/interface.ts +++ b/packages/beacon-node/src/chain/archiver/interface.ts @@ -44,4 +44,5 @@ export interface StateArchiveStrategy { onCheckpoint(stateRoot: RootHex, metrics?: Metrics | null): Promise; onFinalizedCheckpoint(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise; maybeArchiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise; + archiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise; } diff --git a/packages/beacon-node/src/chain/archiver/strategies/frequencyStateArchiveStrategy.ts b/packages/beacon-node/src/chain/archiver/strategies/frequencyStateArchiveStrategy.ts index 6ae592ce7c63..dca7a8ed1f22 100644 --- a/packages/beacon-node/src/chain/archiver/strategies/frequencyStateArchiveStrategy.ts +++ b/packages/beacon-node/src/chain/archiver/strategies/frequencyStateArchiveStrategy.ts @@ -84,7 +84,7 @@ export class FrequencyStateArchiveStrategy implements StateArchiveStrategy { * Archives finalized states from active bucket to archive bucket. * Only the new finalized state is stored to disk */ - private async archiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise { + async archiveState(finalized: CheckpointWithHex, metrics?: Metrics | null): Promise { // starting from Mar 2024, the finalized state could be from disk or in memory const finalizedStateOrBytes = await this.regen.getCheckpointStateOrBytes(finalized); const {rootHex} = finalized;