Skip to content

miner/worker_pow.go — Version Comparison

v1.17.3 v1.17.4
Branch etc/v1.17.3-full-node etc/v1.17.4-full-node
Delta +521 -0 +525 -0

Diff between branches

diff --git a/miner/worker_pow.go b/miner/worker_pow.go
index 67bef0523..ecee6b038 100644
--- a/miner/worker_pow.go
+++ b/miner/worker_pow.go
@@ -489,7 +489,11 @@ func (w *powWorker) commitWork(interrupt *atomic.Int32, timestamp int64) {
        Transactions: work.txs,
        Uncles:       uncles,
    }
-   block := core.AssembleBlock(w.miner.engine, w.chain, work.header, work.state, &body, work.receipts)
+   // Apply consensus rewards (uncle/block rewards). Upstream moved this out of
+   // AssembleBlock, so finalize explicitly before assembling. ETC is never
+   // Amsterdam, so the block-access-list arguments are unused (nil).
+   w.miner.engine.Finalize(w.chain, work.header, work.state, &body, uint32(work.tcount+1), nil)
+   block := core.AssembleBlock(w.chain, work.header, work.state, &body, work.receipts, nil)

    // Allow tests to observe the full sealing task before it is pushed.
    if w.fullTaskHook != nil {
← Back to Version Comparison