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.
This commit is contained in:
Boris Nagaev 2025-05-15 00:37:13 -03:00
parent 64a24177ae
commit 72caafa14e
No known key found for this signature in database

View file

@ -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 {