fix: initialize pending block with an empty block (#1052)

This commit is contained in:
Ömer Faruk Irmak 2024-09-20 17:19:50 +03:00 committed by GitHub
parent c0094ee0b4
commit 7ff93ca224
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -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
}

View file

@ -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
)