Skip to content

Commit

Permalink
fix: initialize pending block with an empty block (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Sep 20, 2024
1 parent c0094ee commit 7ff93ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions miner/scroll_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ func (w *worker) newWork(now time.Time, parentHash common.Hash, reorging bool, r
reorging: reorging,
reorgReason: reorgReason,
}

// initiliaze pending block with an empty block to make sure we always have
// a pending block to serve RPC requests
w.updateSnapshot()
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 7 // Minor version component of the current release
VersionPatch = 20 // Patch version component of the current release
VersionPatch = 21 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

Expand Down

0 comments on commit 7ff93ca

Please sign in to comment.