loop/sweepbatcher
Boris Nagaev d90b4c25a7
sweepbatcher: harden AddSweep race handling
Re-ordered the cleanup in handleSweeps so completed batches are deleted only
after any re-add attempt, preventing a finished batch from being dropped before
it can absorb the re-add.

Added a fresh status/parent-batch lookup inside handleSweeps so the logic now
reacts to swaps that complete between AddSweep and the event-loop handler; fully
confirmed sweeps are routed straight to monitorSpendAndNotify instead of
spawning a duplicate batch.

Added regression test testSweepBatcherHandleSweepRace, which replays the
AddSweep/confirmation race and verifies that only the original batch remains and
the sweep keeps its parent assignment.
2025-10-03 02:29:37 -03:00
..
greedy_batch_selection.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
greedy_batch_selection_test.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
log.go sweepbatcher: add mode with presigned transactions 2025-05-08 17:24:10 -03:00
presigned.go sweepbatcher: subtle adjustments for change 2025-07-29 12:33:56 +02:00
presigned_test.go sweepbatcher: subtle adjustments for change 2025-07-29 12:33:56 +02:00
store.go loopdb: remove unused method ConfirmBatch 2025-06-26 14:01:16 -03:00
store_mock.go loopdb: remove unused method ConfirmBatch 2025-06-26 14:01:16 -03:00
sweep_batch.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
sweep_batch_test.go sweepbatcher: consolidate identical change pkscripts 2025-07-29 21:22:17 +02:00
sweep_batcher.go sweepbatcher: harden AddSweep race handling 2025-10-03 02:29:37 -03:00
sweep_batcher_presigned_test.go sweepbatcher: fix TestPresigned/dust_main_output 2025-09-28 20:57:00 -03:00
sweep_batcher_test.go sweepbatcher: harden AddSweep race handling 2025-10-03 02:29:37 -03:00