Skip to content

Commit

Permalink
avoid double unlock in sequencer AddTxTracker
Browse files Browse the repository at this point in the history
  • Loading branch information
icydark committed Jul 14, 2023
1 parent 123fe95 commit ea72722
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sequencer/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (w *Worker) NewTxTracker(tx types.Transaction, counters state.ZKCounters, i
// AddTxTracker adds a new Tx to the Worker
func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (dropReason error, isWIP bool) {
w.workerMutex.Lock()
defer w.workerMutex.Unlock()

addr, found := w.pool[tx.FromStr]

Expand Down Expand Up @@ -102,6 +101,8 @@ func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (dropReason er
w.efficiencyList.add(newReadyTx)
}

w.workerMutex.Unlock()

return nil, true
}

Expand Down

0 comments on commit ea72722

Please sign in to comment.