From 6dddbf49b9aa437140879b03325085d55cc85da0 Mon Sep 17 00:00:00 2001 From: drk Date: Tue, 24 Oct 2023 22:33:06 -0500 Subject: [PATCH] bugfix: do not overwrite block being appended with the pending block --- core/worker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/worker.go b/core/worker.go index f43eec685b..af79f07d70 100644 --- a/core/worker.go +++ b/core/worker.go @@ -512,13 +512,13 @@ func (w *worker) GeneratePendingHeader(block *types.Block, fill bool) (*types.He w.current = work // Create a local environment copy, avoid the data race with snapshot state. - block, err = w.FinalizeAssemble(w.hc, work.header, block, work.state, work.txs, work.unclelist(), work.etxs, work.subManifest, work.receipts) + newBlock, err := w.FinalizeAssemble(w.hc, work.header, block, work.state, work.txs, work.unclelist(), work.etxs, work.subManifest, work.receipts) if err != nil { return nil, err } - work.header = block.Header() - w.printPendingHeaderInfo(work, block, start) + work.header = newBlock.Header() + w.printPendingHeaderInfo(work, newBlock, start) return work.header, nil }