Skip to content

Commit

Permalink
add time check for apply tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Jun 11, 2024
1 parent 1e009d2 commit ff085c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff085c4

Please sign in to comment.