From 4ef3d75ca4733226de0dde6d72c7cc31c5f8be2a Mon Sep 17 00:00:00 2001 From: agnusmor <100322135+agnusmor@users.noreply.github.com> Date: Wed, 14 Jun 2023 09:29:13 +0200 Subject: [PATCH] move log for the best fitting tx (#2192) --- sequencer/worker.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sequencer/worker.go b/sequencer/worker.go index b138ff55ba..0f5345baea 100644 --- a/sequencer/worker.go +++ b/sequencer/worker.go @@ -263,7 +263,6 @@ func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker { if foundAt == -1 || foundAt > i { foundAt = i tx = txCandidate - log.Infof("GetBestFittingTx found tx(%s) at index(%d) with efficiency(%f)", tx.Hash.String(), i, tx.Efficiency) } foundMutex.Unlock() @@ -273,6 +272,12 @@ func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker { } wg.Wait() + if foundAt != -1 { + log.Infof("GetBestFittingTx found tx(%s) at index(%d) with efficiency(%f)", tx.Hash.String(), foundAt, tx.Efficiency) + } else { + log.Infof("GetBestFittingTx no tx found") + } + return tx }