dcrdex
dcrdex copied to clipboard
mm: prevent bot from starting on markets where bond isn't posted or connection is unstable
I had two things that occured more or less simultaneously:
- I started an MM on a market on dex.decred.org before the bond had been confirmed.
- My connection to the server was very unstable (timing out/reconnecting several times a minute)
I stepped away for half an hour or so while the bond confirmed and when I came back I had multiple post bond errors:
postbond request error (will retry): timed out waiting for "postbond" response (timeout) (*core.Error)
Though it looked like it eventually confirmed but my account had been penalized by the sever so I coudln't trade.
After a bit more testing I found that having connection issues with the sever was making the MM orders go straight from epoch to revoked.
I'd suggest that when you click "Allocate and run" for a bot, it also checks that it is possible to trade in the market (e.g. bond has been posted/confirmed) and that the connection to the server is stable, with an appropiate warning/error if either of those isn't met.