decred / dcrd

Decred daemon in Go (golang).
https://decred.org
ISC License
731 stars 289 forks source link

mixclient: Remove submit queue channel #3401

Closed jrick closed 1 month ago

jrick commented 1 month ago

The submit queue channel was not actually increasing any performance. (peer).submit() would synchronously wait for all error results, and the call to (Wallet).SubmitMixMessage was already synchronized by the mixpool mutex.

Furthermore, this also fixes a deadlock that was observed after a mixing wallet with the RPC syncer mode reconnected to a restarted dcrd. Pair request messages were being submitted onto the channel with the client mutex held in (*Client).Dicemix. However, handleSubmitQueue had already exited and the client had not yet been restarted after dcrd reconnect, and was unable to be started due to the locked mutex.