From 7ee8303601cd2290137804e7fcab7adfdbf91c38 Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Tue, 13 Aug 2024 21:57:41 +0200 Subject: [PATCH] fix(manager): unsubmitted bytes for batch calculation fix (#1019) --- block/manager.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/manager.go b/block/manager.go index 28f3681bd..eeac90750 100644 --- a/block/manager.go +++ b/block/manager.go @@ -152,12 +152,15 @@ func (m *Manager) Start(ctx context.Context) error { // Sequencer must wait till DA is synced to start submitting blobs <-m.DAClient.Synced() - nBytes := m.GetUnsubmittedBytes() - bytesProducedC := make(chan int) + err = m.syncFromSettlement() if err != nil { return fmt.Errorf("sync block manager from settlement: %w", err) } + + nBytes := m.GetUnsubmittedBytes() + bytesProducedC := make(chan int) + uerrors.ErrGroupGoLog(eg, m.logger, func() error { return m.SubmitLoop(ctx, bytesProducedC) })