mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
miner: fix inconsistent error evaluation, close XFN-60 (#1632)
This commit is contained in:
parent
0677ab40a2
commit
815995e9e0
1 changed files with 4 additions and 4 deletions
|
|
@ -1018,15 +1018,15 @@ func (w *Work) commitTransactions(mux *event.TypeMux, balanceFee map[common.Addr
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logs, tokenFeeUsed, gas, err := w.commitTransaction(balanceFee, tx, bc, coinbase, gp)
|
logs, tokenFeeUsed, gas, err := w.commitTransaction(balanceFee, tx, bc, coinbase, gp)
|
||||||
switch err {
|
switch {
|
||||||
case core.ErrNonceTooLow:
|
case errors.Is(err, core.ErrNonceTooLow):
|
||||||
// New head notification data race between the transaction pool and miner, shift
|
// New head notification data race between the transaction pool and miner, shift
|
||||||
log.Trace("Skipping special transaction with low nonce", "sender", from, "nonce", tx.Nonce(), "to", to)
|
log.Trace("Skipping special transaction with low nonce", "sender", from, "nonce", tx.Nonce(), "to", to)
|
||||||
|
|
||||||
case core.ErrNonceTooHigh:
|
case errors.Is(err, core.ErrNonceTooHigh):
|
||||||
// Reorg notification data race between the transaction pool and miner, skip account =
|
// Reorg notification data race between the transaction pool and miner, skip account =
|
||||||
log.Trace("Skipping account with special transaction hight nonce", "sender", from, "nonce", tx.Nonce(), "to", to)
|
log.Trace("Skipping account with special transaction hight nonce", "sender", from, "nonce", tx.Nonce(), "to", to)
|
||||||
case nil:
|
case errors.Is(err, nil):
|
||||||
// Everything ok, collect the logs and shift in the next transaction from the same account
|
// Everything ok, collect the logs and shift in the next transaction from the same account
|
||||||
coalescedLogs = append(coalescedLogs, logs...)
|
coalescedLogs = append(coalescedLogs, logs...)
|
||||||
w.tcount++
|
w.tcount++
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue