Skip to content

Commit

Permalink
fix error handling (#3266)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM authored Feb 13, 2024
1 parent 9828977 commit 2f1ecc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sequencer/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,13 @@ func (f *finalizer) processTransaction(ctx context.Context, tx *TxTracker, first
} else if err == nil && !batchResponse.IsRomLevelError && len(batchResponse.BlockResponses) == 0 {
err = fmt.Errorf("executor returned no errors and no responses for tx %s", tx.HashStr)
f.Halt(ctx, err, false)
} else if batchResponse.IsExecutorLevelError {
} else if err != nil {
log.Errorf("error received from executor, error: %v", err)
// Delete tx from the worker
f.workerIntf.DeleteTx(tx.Hash, tx.From)

// Set tx as invalid in the pool
errMsg := batchResponse.ExecutorError.Error()
errMsg := err.Error()
err = f.poolIntf.UpdateTxStatus(ctx, tx.Hash, pool.TxStatusInvalid, false, &errMsg)
if err != nil {
log.Errorf("failed to update status to invalid in the pool for tx %s, error: %v", tx.Hash.String(), err)
Expand Down

0 comments on commit 2f1ecc4

Please sign in to comment.