Skip to content

Commit d050619

Browse files
committed
refactor(fast-inbox): reuse ConsumedBucketCursor for the streaming checkpoint cursor (A-1382)
1 parent 915faf0 commit d050619

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

yarn-project/sequencer-client/src/sequencer/checkpoint_proposal_job.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ import type { CheckpointProposalJobMetricsRecorder } from './checkpoint_proposal
7676
import { CheckpointVoter } from './checkpoint_voter.js';
7777
import { SequencerInterruptedError } from './errors.js';
7878
import type { SequencerEvents } from './events.js';
79-
import { type InboxBucketSelection, selectInboxBucketForBlock } from './inbox_bucket_selector.js';
79+
import {
80+
type ConsumedBucketCursor,
81+
type InboxBucketSelection,
82+
selectInboxBucketForBlock,
83+
} from './inbox_bucket_selector.js';
8084
import type { SequencerMetrics } from './metrics.js';
8185
import type { RequestsTracker } from './requests_tracker.js';
8286
import type { SequencerRollupConstants } from './types.js';
@@ -108,7 +112,7 @@ type StreamingCheckpointState = {
108112
/** Cumulative Inbox message count consumed as of the parent checkpoint; the per-checkpoint cap origin (fixed). */
109113
checkpointStartTotalMsgCount: bigint;
110114
/** The last bucket consumed so far (parent checkpoint's at the first block); advances as blocks consume. */
111-
parent: { seq: bigint; totalMsgCount: bigint };
115+
parent: ConsumedBucketCursor;
112116
/** Reference to the last consumed bucket; reused by blocks that consume nothing. */
113117
lastBucketRef: InboxBucketRef;
114118
/** All message leaves consumed so far this checkpoint, in insertion order; drives the running `inHash`. */

0 commit comments

Comments
 (0)