mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-28 13:52:57 +00:00
core/txpool/legacypool: use types.Sender instead of signer.Sender (#34059)
`pool.signer.Sender(tx)` bypasses the sender cache used by types.Sender, which can force an extra signature recovery for every promotable tx (promotion runs frequently). Use `types.Sender(pool.signer, tx)` here to keep sender derivation cached and consistent.
This commit is contained in:
parent
bd3c8431d9
commit
d1369b69f5
1 changed files with 1 additions and 1 deletions
|
|
@ -1404,7 +1404,7 @@ func (pool *LegacyPool) promoteExecutables(accounts []common.Address) []*types.T
|
|||
// promote all promotable transactions
|
||||
promoted := make([]*types.Transaction, 0, len(promotable))
|
||||
for _, tx := range promotable {
|
||||
from, _ := pool.signer.Sender(tx)
|
||||
from, _ := types.Sender(pool.signer, tx) // already validated
|
||||
if pool.promoteTx(from, tx.Hash(), tx) {
|
||||
promoted = append(promoted, tx)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue