decred / dcrd

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

mixclient: Improve error returning #3312

Closed jrick closed 3 months ago

jrick commented 3 months ago

When creating the alternate session failed during a run, the wrong error was being returned to the caller.

To simplify this logic, don't check the alternate session's error field here, and just return the alternate session (itself implementing the error type) to the caller (pairSessions, who calls run).

While here, some additional details are included in the wrapped error returned when receiving KEs, which will aid in future debugging.