Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,10 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
// Start executing the transaction
env.state.Prepare(tx.Hash(), env.tcount)

start := time.Now()
var start time.Time
if log.Root().GetHandler().Level() >= log.LvlDebug {
start = time.Now()
Comment thread
0xsharma marked this conversation as resolved.
}

logs, err := w.commitTransaction(env, tx)

Expand All @@ -1037,7 +1040,9 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
coalescedLogs = append(coalescedLogs, logs...)
env.tcount++
txs.Shift()
log.Info("Committed new tx", "tx hash", tx.Hash(), "from", from, "to", tx.To(), "nonce", tx.Nonce(), "gas", tx.Gas(), "gasPrice", tx.GasPrice(), "value", tx.Value(), "time spent", time.Since(start))
if log.Root().GetHandler().Level() >= log.LvlDebug {
log.Debug("Committed new tx", "tx hash", tx.Hash(), "from", from, "to", tx.To(), "nonce", tx.Nonce(), "gas", tx.Gas(), "gasPrice", tx.GasPrice(), "value", tx.Value(), "time spent", time.Since(start))
}

case errors.Is(err, core.ErrTxTypeNotSupported):
// Pop the unsupported transaction without shifting in the next from the account
Expand Down