loop/sweepbatcher
Boris Nagaev 1b25d8a122
sweepbatcher: assert close-during-add run exit
TestSweepBatcherCloseDuringAdding previously started Batcher.Run in a
detached goroutine and called test assertions from that goroutine. The
test only waited for the add/cancel workers, so a Run-side shutdown
error could be missed or reported unreliably.

Route the Run result through a channel and wait for it in the main test
goroutine. While waiting, keep draining spend registrations so shutdown
cannot deadlock on mock notifier traffic.

This makes the existing shutdown-race test cover both sides of the race:
AddSweep callers may exit with cancellation, and Batcher.Run must also
terminate with an expected shutdown error.
2026-05-18 11:58:54 +02:00
..
greedy_batch_selection.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
greedy_batch_selection_test.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
log.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
presigned.go sweepbatcher: presign transactions in parallel 2025-10-14 22:37:18 -03:00
presigned_test.go sweepbatcher: presign transactions in parallel 2025-10-14 22:37:18 -03:00
store.go sweepbatcher: persist confirmed batches atomically 2025-12-04 00:37:01 -03:00
store_mock.go sweepbatcher: persist confirmed batches atomically 2025-12-04 00:37:01 -03:00
sweep_batch.go lint: fix linter issues 2026-03-09 14:39:45 +01:00
sweep_batch_test.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
sweep_batcher.go sweepbatcher: mask presign cancellation races 2026-05-18 11:58:54 +02:00
sweep_batcher_presigned_test.go sweepbatcher: fix fee rate calculation (publish) 2025-10-11 22:15:56 -03:00
sweep_batcher_test.go sweepbatcher: assert close-during-add run exit 2026-05-18 11:58:54 +02:00