From 68259026b0f3ce10ee664e85af2060ad1b3abea7 Mon Sep 17 00:00:00 2001 From: Javed Khan Date: Mon, 14 Aug 2023 07:07:06 -0700 Subject: [PATCH] batcher: wait catchup before submit (#205) * op-batcher: wait catchup before blob submit * op-batcher: use header.syncwait instead of das.waitcatchup --- op-service/txmgr/txmgr.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/op-service/txmgr/txmgr.go b/op-service/txmgr/txmgr.go index 88013632b5b5..1f5265070414 100644 --- a/op-service/txmgr/txmgr.go +++ b/op-service/txmgr/txmgr.go @@ -229,6 +229,11 @@ func (m *SimpleTxManager) send(ctx context.Context, candidate TxCandidate) (*typ m.l.Warn("unable to create blob commitment to celestia", "err", err) return nil, err } + err = m.daClient.Header.SyncWait(ctx) + if err != nil { + m.l.Warn("unable to wait for celestia header sync", "err", err) + return nil, err + } height, err := m.daClient.Blob.Submit(ctx, []*blob.Blob{dataBlob}) if err != nil { m.l.Warn("unable to publish tx to celestia", "err", err)