From d82b3624b94893339476cf2afc7b12b6d182b21c Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Tue, 11 Nov 2025 23:36:03 -0300 Subject: [PATCH] sweepbatcher: fix code format --- sweepbatcher/sweep_batch.go | 1 + sweepbatcher/sweep_batcher_test.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sweepbatcher/sweep_batch.go b/sweepbatcher/sweep_batch.go index 4415d3fc..58cdf19d 100644 --- a/sweepbatcher/sweep_batch.go +++ b/sweepbatcher/sweep_batch.go @@ -2439,6 +2439,7 @@ func (b *batch) isComplete() bool { if err != nil && err != ErrBatchShuttingDown { return false } + return b.state == Confirmed } diff --git a/sweepbatcher/sweep_batcher_test.go b/sweepbatcher/sweep_batcher_test.go index 009e8da0..2fccd17f 100644 --- a/sweepbatcher/sweep_batcher_test.go +++ b/sweepbatcher/sweep_batcher_test.go @@ -4149,9 +4149,9 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore, go func() { defer addWG.Done() - // After this goroutine completes, stop the goroutine that handles - // registrations as well. Give it one second to finish the last - // AddSweep to prevent goroutine leaks. + // After this goroutine completes, stop the goroutine that + // handles registrations as well. Give it one second to finish + // the last AddSweep to prevent goroutine leaks. defer time.AfterFunc(time.Second, confCancel) for {