Skip to content

Create new mix clients in Wallet.Run.#2590

Merged
jrick merged 1 commit intodecred:masterfrom
jrick:newmixc
Dec 1, 2025
Merged

Create new mix clients in Wallet.Run.#2590
jrick merged 1 commit intodecred:masterfrom
jrick:newmixc

Conversation

@jrick
Copy link
Member

@jrick jrick commented Dec 1, 2025

The wallet's Run method, which is invoked by the syncers to run the background goroutines necessary to run the mixing client, will be run multiple times by the RPC syncer (as syncers must be created following loss of the RPC connection). However, mixclient does not work properly after the first context cancelation. This would cause all mixing activity to silently not work, technically hanging in mixclient, while never hanging any other wallet activity.

This can be worked around in wallet without mixclient changes by recreating a new client each time in wallet's Run method. Additional synchronization is required to avoid racing on the mixclient pointer.

The wallet's Run method, which is invoked by the syncers to run the background
goroutines necessary to run the mixing client, will be run multiple times by
the RPC syncer (as syncers must be created following loss of the RPC
connection).  However, mixclient does not work properly after the first
context cancelation.  This would cause all mixing activity to silently not
work, technically hanging in mixclient, while never hanging any other wallet
activity.

This can be worked around in wallet without mixclient changes by recreating a
new client each time in wallet's Run method.  Additional synchronization is
required to avoid racing on the mixclient pointer.
@jrick jrick merged commit 5609155 into decred:master Dec 1, 2025
2 checks passed
@jrick jrick deleted the newmixc branch December 1, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants