Skip to content

Commit

Permalink
[R4R]Fix mining-prefetcher panic for empty transaction initial of txC…
Browse files Browse the repository at this point in the history
…urr(#843)
  • Loading branch information
qinglin89 authored Apr 6, 2022
2 parents 05925da + 1ff4721 commit 12c5eb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ func (w *worker) commitTransactions(txs *types.TransactionsByPriceAndNonce, coin

interruptCh := make(chan struct{})
defer close(interruptCh)
tx := &types.Transaction{}
txCurr := &tx
//prefetch txs from all pending txs
txsPrefetch := txs.Copy()
tx := txsPrefetch.Peek()
txCurr := &tx
w.prefetcher.PrefetchMining(txsPrefetch, w.current.header, w.current.gasPool.Gas(), w.current.state.Copy(), *w.chain.GetVMConfig(), interruptCh, txCurr)

LOOP:
Expand Down

0 comments on commit 12c5eb0

Please sign in to comment.