Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Sep 16, 2024
1 parent a58fb3a commit 219f2e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (m *Manager) Start(ctx context.Context) error {
}

/* ----------------------------- sequencer mode ----------------------------- */
// Subscribe to batch events, to update last submitted height in case batch confirmation was lost. This could happen if the sequencer crash/restarted just after submitting a batch to the settelement and by the time we query the last batch, this batch wasn't accepted yet.
// Subscribe to batch events, to update last submitted height in case batch confirmation was lost. This could happen if the sequencer crash/restarted just after submitting a batch to the settelement and by the time we query the last batch, this batch wasn't accepted yet.

Check failure on line 180 in block/manager.go

View workflow job for this annotation

GitHub Actions / golangci-lint

`settelement` is a misspelling of `settlement` (misspell)
go uevent.MustSubscribe(ctx, m.Pubsub, "updateSubmittedHeightLoop", settlement.EventQueryNewSettlementBatchAccepted, m.UpdateLastSubmittedHeight, m.logger)

// Sequencer must wait till DA is synced to start submitting blobs
Expand Down
6 changes: 3 additions & 3 deletions block/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ func SubmitLoopInner(
logger.Error("Create and submit batch", "err", err, "pending", pending)
panic(err)
}
// this could happen if we timed-out waiting for acceptance in the previous iteration, but the batch was indeed submitted.
// we panic here cause restarting may reset the last batch submitted counter and the sequencer can potentially resume submitting batches.
// this could happen if we timed-out waiting for acceptance in the previous iteration, but the batch was indeed submitted.
// we panic here cause restarting may reset the last batch submitted counter and the sequencer can potentially resume submitting batches.
if errors.Is(err, gerrc.ErrAlreadyExists) {
logger.Debug("Batch already accepted", "err", err, "pending", pending)
panic(err)
Expand Down Expand Up @@ -273,7 +273,7 @@ func (m *Manager) GetUnsubmittedBlocks() uint64 {
return m.State.Height() - m.LastSubmittedHeight.Load()
}

// UpdateLastSubmittedHeight will update last height submitted height upon events.
// UpdateLastSubmittedHeight will update last height submitted height upon events.
// This may be necessary in case we crashed/restarted before getting response for our submission to the settlement layer.
func (m *Manager) UpdateLastSubmittedHeight(event pubsub.Message) {
eventData, ok := event.Data().(*settlement.EventDataNewBatchAccepted)
Expand Down

0 comments on commit 219f2e0

Please sign in to comment.