From 2e4055bb772edfc3179734f54c05a5dc6e9509ff Mon Sep 17 00:00:00 2001 From: Omri Date: Thu, 15 Aug 2024 15:38:39 +0200 Subject: [PATCH] fix(manager): unsubmitted bytes for batch calculation fix (#1019) (#1023) Co-authored-by: Sergi Rene --- 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) })