Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,24 @@ func (w *worker) mainLoop() {
if delay <= 0 {
continue
}
if len(ev.Txs) == 0 {
w.newTxs.Add(0)
continue
}

// Warm up cryptographic sender caches in parallel across cores
var wg sync.WaitGroup
for _, tx := range ev.Txs {
wg.Add(1)
go func(t *types.Transaction) {
defer wg.Done()
if w.current != nil {
types.Sender(w.current.signer, t)
}
}(tx)
}
wg.Wait()

txs := make(map[common.Address][]*txpool.LazyTransaction, len(ev.Txs))
for _, tx := range ev.Txs {
acc, _ := types.Sender(w.current.signer, tx)
Expand Down
Loading