diff --git a/mixing/mixclient/client.go b/mixing/mixclient/client.go index 4a0756701..b1a3239c0 100644 --- a/mixing/mixclient/client.go +++ b/mixing/mixclient/client.go @@ -739,6 +739,8 @@ func (c *Client) Dicemix(ctx context.Context, rand io.Reader, cj *CoinJoin) erro case <-c.warming: case <-ctx.Done(): return ctx.Err() + default: + return ErrWarming } pub, priv, err := generateSecp256k1(rand) diff --git a/mixing/mixclient/errors.go b/mixing/mixclient/errors.go index 20fe58d50..a53cb7c58 100644 --- a/mixing/mixclient/errors.go +++ b/mixing/mixclient/errors.go @@ -6,6 +6,8 @@ var ( ErrTooFewPeers = errors.New("not enough peers required to mix") ErrUnknownPRs = errors.New("unable to participate in reformed session referencing unknown PRs") + + ErrWarming = errors.New("mixing client is observing messages; retry request later") ) // testPeerBlamedError describes the error condition of a misbehaving peer