Skip to content

Commit

Permalink
return empty
Browse files Browse the repository at this point in the history
  • Loading branch information
gupadhyaya committed Aug 19, 2024
1 parent b23fe6b commit f2daab5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func (tq *TransactionQueue) GetNextBatch() *sequencing.Batch {
defer tq.mu.Unlock()

size := len(tq.queue)
if size == 0 {
return &sequencing.Batch{Transactions: nil}
}
batch := tq.queue[:size]
tq.queue = tq.queue[size:]
return &sequencing.Batch{Transactions: batch}
Expand Down

0 comments on commit f2daab5

Please sign in to comment.