Skip to content

Commit

Permalink
Cleaned up the worker, removed commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers authored and wizeguyy committed Jan 25, 2023
1 parent 48bbe7c commit 45ca3c7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,7 @@ func (w *worker) GeneratePendingHeader(block *types.Block) (*types.Header, error
if err != nil {
return nil, err
}
// Create an empty block based on temporary copied state for
// sealing in advance without waiting block execution finished.
// if !noempty && atomic.LoadUint32(&w.noempty) == 0 {
// w.commit(work.copy(), nil, false, start)
// }

// Fill pending transactions from the txpool
w.adjustGasLimit(nil, work, block)
w.fillTransactions(interrupt, work)
Expand Down Expand Up @@ -464,7 +460,6 @@ func (w *worker) GeneratePendingHeader(block *types.Block) (*types.Header, error
sealHash := w.engine.SealHash(task.block.Header())
if sealHash == prev {
log.Info("sealHash == prev, continuing with sending task to pending channel", "seal", sealHash, "prev", prev)
// continue
}
// Interrupt previous sealing operation
interruptFunc()
Expand Down Expand Up @@ -533,6 +528,7 @@ func (w *worker) mainLoop() {
}

case ev := <-w.txsCh:

// Apply transactions to the pending state if we're not sealing
//
// Note all transactions received may not be continuous with transactions
Expand Down

0 comments on commit 45ca3c7

Please sign in to comment.