mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
extract from only if needed
This commit is contained in:
parent
b97198379b
commit
6add84724a
1 changed files with 3 additions and 4 deletions
|
|
@ -390,10 +390,6 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error may be ignored here. The error has already been checked
|
|
||||||
// during transaction acceptance in the transaction pool.
|
|
||||||
from, _ := types.Sender(env.signer, tx)
|
|
||||||
|
|
||||||
// Check whether the tx is replay protected. If we're not in the EIP155 hf
|
// Check whether the tx is replay protected. If we're not in the EIP155 hf
|
||||||
// phase, start ignoring the sender until we do.
|
// phase, start ignoring the sender until we do.
|
||||||
if tx.Protected() && !miner.chainConfig.IsEIP155(env.header.Number) {
|
if tx.Protected() && !miner.chainConfig.IsEIP155(env.header.Number) {
|
||||||
|
|
@ -407,6 +403,9 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran
|
||||||
err := miner.commitTransaction(env, tx)
|
err := miner.commitTransaction(env, tx)
|
||||||
switch {
|
switch {
|
||||||
case errors.Is(err, core.ErrNonceTooLow):
|
case errors.Is(err, core.ErrNonceTooLow):
|
||||||
|
// Error may be ignored here. The error has already been checked
|
||||||
|
// during transaction acceptance in the transaction pool.
|
||||||
|
from, _ := types.Sender(env.signer, tx)
|
||||||
// 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 transaction with low nonce", "hash", ltx.Hash, "sender", from, "nonce", tx.Nonce())
|
log.Trace("Skipping transaction with low nonce", "hash", ltx.Hash, "sender", from, "nonce", tx.Nonce())
|
||||||
txs.Shift()
|
txs.Shift()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue