diff --git a/params/version.go b/params/version.go index f6bd9c3bdca4..7d19cf91ef3f 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 28 // Patch version component of the current release + VersionPatch = 29 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/rollup/pipeline/pipeline.go b/rollup/pipeline/pipeline.go index d66a04e33809..172bf1def68c 100644 --- a/rollup/pipeline/pipeline.go +++ b/rollup/pipeline/pipeline.go @@ -310,14 +310,16 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim var deadlineReached bool go func() { + deadlineTimer := time.NewTimer(time.Until(deadline)) defer func() { close(resultCh) + deadlineTimer.Stop() lifetimeTimer.UpdateSince(p.start) }() for { idleStart := time.Now() select { - case <-time.After(time.Until(deadline)): + case <-deadlineTimer.C: cccIdleTimer.UpdateSince(idleStart) // note: currently we don't allow empty blocks, but if we ever do; make sure to CCC check it first if lastCandidate != nil { @@ -328,8 +330,6 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim return } deadlineReached = true - // avoid deadline case being triggered again and again - deadline = time.Now().Add(time.Hour) case candidate := <-candidates: cccIdleTimer.UpdateSince(idleStart) cccStart := time.Now()