From 72caafa14e8f2dfdc9afb3aaea1b9dd54d890f92 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Thu, 15 May 2025 00:37:13 -0300 Subject: [PATCH] sweepbatcher: fix a bug in dest address selection For presigned possible remaining groups, the destination address of the current batch was used instead of the destination address of an expected future batch. TODO: reproduce in unit test "purged". For this, each swap should have a separate destination address. --- sweepbatcher/presigned.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sweepbatcher/presigned.go b/sweepbatcher/presigned.go index e813cd69..385f34cf 100644 --- a/sweepbatcher/presigned.go +++ b/sweepbatcher/presigned.go @@ -247,7 +247,7 @@ func (b *batch) presign(ctx context.Context, newSweeps []*sweep) error { // Cache the destination address. destAddr, err := getPresignedSweepsDestAddr( - ctx, b.cfg.presignedHelper, b.primarySweepID, + ctx, b.cfg.presignedHelper, primarySweepID, b.cfg.chainParams, ) if err != nil {