From ff085c46f63f6717b43c3ebf9814793ce9896180 Mon Sep 17 00:00:00 2001 From: Mikhail Wall Date: Tue, 11 Jun 2024 21:07:08 +0200 Subject: [PATCH] add time check for apply tx --- miner/worker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miner/worker.go b/miner/worker.go index 201db9ea8b..3fad0688e6 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -754,10 +754,12 @@ func (w *worker) commitTransaction(env *environment, tx *types.Transaction) ([]* if tx.Type() == types.BlobTxType { return w.commitBlobTransaction(env, tx) } + start := time.Now() receipt, err := w.applyTransaction(env, tx) if err != nil { return nil, err } + log.Info("apply transaction time", "hash", tx.Hash(), "to", tx.To(), "gas", tx.Gas(), "gasPrice", tx.GasPrice(), "took", time.Since(start).Milliseconds()) env.txs = append(env.txs, tx) env.receipts = append(env.receipts, receipt) return receipt.Logs, nil