From 219f2e002e621dcfeb397757cc979fa97b1e50c4 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Mon, 16 Sep 2024 18:23:28 +0200 Subject: [PATCH] lint fix --- block/manager.go | 2 +- block/submit.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/manager.go b/block/manager.go index cc17905d..1af7417c 100644 --- a/block/manager.go +++ b/block/manager.go @@ -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. go uevent.MustSubscribe(ctx, m.Pubsub, "updateSubmittedHeightLoop", settlement.EventQueryNewSettlementBatchAccepted, m.UpdateLastSubmittedHeight, m.logger) // Sequencer must wait till DA is synced to start submitting blobs diff --git a/block/submit.go b/block/submit.go index e582b12d..2547379a 100644 --- a/block/submit.go +++ b/block/submit.go @@ -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) @@ -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)