fix: disable commitNewWork on follower nodes (#472)

fix: disable mining on follower nodes
This commit is contained in:
Péter Garamvölgyi 2023-08-18 16:06:15 +02:00 committed by GitHub
parent b2bd2838ac
commit ad4ddbf60f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -1159,6 +1159,10 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
w.mu.RLock()
defer w.mu.RUnlock()
if !w.isRunning() {
return
}
tstart := time.Now()
parent := w.chain.CurrentBlock()
w.circuitCapacityChecker.Reset()

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 4 // Major version component of the current release
VersionMinor = 3 // Minor version component of the current release
VersionPatch = 40 // Patch version component of the current release
VersionPatch = 41 // Patch version component of the current release
VersionMeta = "sepolia" // Version metadata to append to the version string
)