diff --git a/sequencer/dbmanager.go b/sequencer/dbmanager.go index 86c92b3a87..ce0c4ccb44 100644 --- a/sequencer/dbmanager.go +++ b/sequencer/dbmanager.go @@ -485,6 +485,7 @@ func (d *dbManager) ProcessForcedBatch(ForcedBatchNumber uint64, request state.P processBatchResponse, err := d.state.ProcessSequencerBatch(d.ctx, request.BatchNumber, forcedBatch.RawTxsData, request.Caller, dbTx) if err != nil { log.Errorf("failed to process a forced batch, err: %v", err) + return nil, err } // Close Batch diff --git a/state/batch.go b/state/batch.go index 6f302daa5f..36622be633 100644 --- a/state/batch.go +++ b/state/batch.go @@ -145,10 +145,15 @@ func (s *State) ProcessSequencerBatch(ctx context.Context, batchNumber uint64, b return nil, err } - txs, _, err := DecodeTxs(batchL2Data) - if err != nil && !errors.Is(err, ErrInvalidData) { - return nil, err + txs := []types.Transaction{} + + if processBatchResponse.Responses != nil && len(processBatchResponse.Responses) > 0 { + txs, _, err = DecodeTxs(batchL2Data) + if err != nil && !errors.Is(err, ErrInvalidData) { + return nil, err + } } + result, err := s.convertToProcessBatchResponse(txs, processBatchResponse) if err != nil { return nil, err