Skip to content

Commit

Permalink
Merge pull request ethereum#6 from ethereum-optimism/no-deposit-reinject
Browse files Browse the repository at this point in the history
core: do not try to reinject deposit txs
  • Loading branch information
protolambda committed Sep 6, 2022
1 parent a0b7861 commit 99fad45
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,16 @@ func (pool *TxPool) reset(oldHead, newHead *types.Header) {
return
}
}
// Do not insert deposit txs back into the pool
// (validateTx would still catch it if not filtered, but no need to re-inject in the first place).
j := 0
for _, tx := range discarded {
if tx.Type() != types.DepositTxType {
discarded[j] = tx
j++
}
}
discarded = discarded[:j]
reinject = types.TxDifference(discarded, included)
}
}
Expand Down

0 comments on commit 99fad45

Please sign in to comment.