Skip to content

Commit e6cc960

Browse files
authored
fix: properly release pipeline stages (#783)
1 parent 34162ef commit e6cc960

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

miner/scroll_worker.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func (w *worker) collectPendingL1Messages(startIndex uint64) []types.L1MessageTx
401401
func (w *worker) startNewPipeline(timestamp int64) {
402402

403403
if w.currentPipeline != nil {
404-
w.currentPipeline.Kill()
404+
w.currentPipeline.Release()
405405
w.currentPipeline = nil
406406
}
407407

@@ -586,6 +586,7 @@ func (w *worker) handlePipelineResult(res *pipeline.Result) error {
586586
if res != nil && res.FinalBlock != nil {
587587
w.updateSnapshot(res.FinalBlock)
588588
}
589+
w.currentPipeline.Release()
589590
w.currentPipeline = nil
590591
return nil
591592
}
@@ -750,6 +751,7 @@ func (w *worker) commit(res *pipeline.Result) error {
750751
// Broadcast the block and announce chain insertion event
751752
w.mux.Post(core.NewMinedBlockEvent{Block: block})
752753

754+
w.currentPipeline.Release()
753755
w.currentPipeline = nil
754756
return nil
755757
}

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 5 // Major version component of the current release
2626
VersionMinor = 3 // Minor version component of the current release
27-
VersionPatch = 27 // Patch version component of the current release
27+
VersionPatch = 28 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

rollup/pipeline/pipeline.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ func (p *Pipeline) TryPushTxn(tx *types.Transaction) (*Result, error) {
165165
}
166166
}
167167

168-
func (p *Pipeline) Kill() {
168+
// Release releases all resources related to the pipeline
169+
func (p *Pipeline) Release() {
169170
if p.txnQueue != nil {
170171
close(p.txnQueue)
172+
p.txnQueue = nil
171173
}
172174

173175
select {

0 commit comments

Comments
 (0)