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)