Skip to content

Commit 4dad65c

Browse files
authored
auto-start next conversion batch after completion if pending
1 parent 6426257 commit 4dad65c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/txpool/blobpool/conversion.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ func (q *conversionQueue) loop() {
161161

162162
case <-done:
163163
done, interrupt = nil, nil
164+
if len(txTasks) > 0 {
165+
done, interrupt = make(chan struct{}), new(atomic.Int32)
166+
tasks := slices.Clone(txTasks)
167+
txTasks = txTasks[:0]
168+
go q.run(tasks, done, interrupt)
169+
}
164170

165171
case fn := <-q.startBilly:
166172
q.billyQueue = append(q.billyQueue, fn)

0 commit comments

Comments
 (0)