mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 00:43:46 +00:00
add time check for apply tx
This commit is contained in:
parent
1e009d2095
commit
ff085c46f6
1 changed files with 2 additions and 0 deletions
|
|
@ -754,10 +754,12 @@ func (w *worker) commitTransaction(env *environment, tx *types.Transaction) ([]*
|
||||||
if tx.Type() == types.BlobTxType {
|
if tx.Type() == types.BlobTxType {
|
||||||
return w.commitBlobTransaction(env, tx)
|
return w.commitBlobTransaction(env, tx)
|
||||||
}
|
}
|
||||||
|
start := time.Now()
|
||||||
receipt, err := w.applyTransaction(env, tx)
|
receipt, err := w.applyTransaction(env, tx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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.txs = append(env.txs, tx)
|
||||||
env.receipts = append(env.receipts, receipt)
|
env.receipts = append(env.receipts, receipt)
|
||||||
return receipt.Logs, nil
|
return receipt.Logs, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue