Skip to content

Commit

Permalink
fix: add miss cache code after 4844 merge (#110)
Browse files Browse the repository at this point in the history
Co-authored-by: Nolan <33241113+nolanxyg@users.noreply.github.com>
  • Loading branch information
welkin22 and nolanxyg authored May 17, 2024
1 parent f8d1c9e commit 52661bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions miner/payload_building.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 52661bd

Please sign in to comment.