From 9d0d4d634299fe9358032267fc07503d4b40d51c Mon Sep 17 00:00:00 2001 From: Nolan <33241113+nolanxyg@users.noreply.github.com> Date: Sun, 28 Jan 2024 17:03:29 +0800 Subject: [PATCH] fix: add miss code after 4844 merge --- miner/payload_building.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/miner/payload_building.go b/miner/payload_building.go index 2d7150990e..f3b8382783 100644 --- a/miner/payload_building.go +++ b/miner/payload_building.go @@ -350,11 +350,13 @@ func (w *worker) buildPayload(args *BuildPayloadArgs) (*Payload, error) { r := w.getSealingBlock(fullParams) dur := time.Since(start) // update handles error case - payload.update(r, dur) + payload.update(r, dur, func() { + w.cacheMiningBlock(r.block, r.env) + }) if r.err == nil { // after first successful pass, we're updating fullParams.isUpdate = true - }else { + } else { log.Error("Failed to build full payload", "id", payload.id, "err", r.err) } timer.Reset(w.recommit)