mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
miner: log last tx hash before commit interrupt (#1289)
This commit is contained in:
parent
1a05223076
commit
67159969e0
2 changed files with 8 additions and 2 deletions
|
|
@ -540,6 +540,8 @@ func (w *worker) commitTransactionsWithDelay(env *environment, txs *transactions
|
||||||
}(chDeps)
|
}(chDeps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var lastTxHash common.Hash
|
||||||
|
|
||||||
mainloop:
|
mainloop:
|
||||||
for {
|
for {
|
||||||
if interruptCtx != nil {
|
if interruptCtx != nil {
|
||||||
|
|
@ -551,7 +553,7 @@ mainloop:
|
||||||
select {
|
select {
|
||||||
case <-interruptCtx.Done():
|
case <-interruptCtx.Done():
|
||||||
txCommitInterruptCounter.Inc(1)
|
txCommitInterruptCounter.Inc(1)
|
||||||
log.Warn("Tx Level Interrupt")
|
log.Warn("Tx Level Interrupt", "hash", lastTxHash)
|
||||||
break mainloop
|
break mainloop
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
@ -573,6 +575,7 @@ mainloop:
|
||||||
if ltx == nil {
|
if ltx == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
lastTxHash = ltx.Hash
|
||||||
// If we don't have enough space for the next transaction, skip the account.
|
// If we don't have enough space for the next transaction, skip the account.
|
||||||
if env.gasPool.Gas() < ltx.Gas {
|
if env.gasPool.Gas() < ltx.Gas {
|
||||||
log.Trace("Not enough gas left for transaction", "hash", ltx.Hash, "left", env.gasPool.Gas(), "needed", ltx.Gas)
|
log.Trace("Not enough gas left for transaction", "hash", ltx.Hash, "left", env.gasPool.Gas(), "needed", ltx.Gas)
|
||||||
|
|
|
||||||
|
|
@ -956,6 +956,8 @@ func (w *worker) commitTransactions(env *environment, txs *transactionsByPriceAn
|
||||||
}(chDeps)
|
}(chDeps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var lastTxHash common.Hash
|
||||||
|
|
||||||
mainloop:
|
mainloop:
|
||||||
for {
|
for {
|
||||||
// Check interruption signal and abort building if it's fired.
|
// Check interruption signal and abort building if it's fired.
|
||||||
|
|
@ -974,7 +976,7 @@ mainloop:
|
||||||
select {
|
select {
|
||||||
case <-interruptCtx.Done():
|
case <-interruptCtx.Done():
|
||||||
txCommitInterruptCounter.Inc(1)
|
txCommitInterruptCounter.Inc(1)
|
||||||
log.Warn("Tx Level Interrupt")
|
log.Warn("Tx Level Interrupt", "hash", lastTxHash)
|
||||||
break mainloop
|
break mainloop
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
@ -990,6 +992,7 @@ mainloop:
|
||||||
if ltx == nil {
|
if ltx == nil {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
lastTxHash = ltx.Hash
|
||||||
// If we don't have enough space for the next transaction, skip the account.
|
// If we don't have enough space for the next transaction, skip the account.
|
||||||
if env.gasPool.Gas() < ltx.Gas {
|
if env.gasPool.Gas() < ltx.Gas {
|
||||||
log.Trace("Not enough gas left for transaction", "hash", ltx.Hash, "left", env.gasPool.Gas(), "needed", ltx.Gas)
|
log.Trace("Not enough gas left for transaction", "hash", ltx.Hash, "left", env.gasPool.Gas(), "needed", ltx.Gas)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue