Closed rxlxrxsx closed 1 year ago
Addressed by this commit.
I haven't encountered this issue yet however after running the bot for a couple minutes the bot proceeds to place orders as usual but somehow didn't cancel the orders and got stuck causing the bot to not place any orders afterwards. Looking into the logs I didn't see any attempt for the said orders to get canceled.
EDIT: Stopping the bot won't successfully cancel the said orders as well.
Logs, config and data: inj_stuck.zip
@rxlxrxsx, very tricky, but I've pushed a fix for this issue in this commit. The issue happens when we send two orders at the same time and the second order fails. If the first one fails, this won't be an issue.
In my case, I tested the solution it by modifying the code so that the second order always fails. Then I checked if the bot will recover. Hopefully you can come up with a more natural way of testing the fix.
Orders were successfully created. There were no non-existing orders trying to be cancelled.
Summary and Screenshots
The bot gets stuck trying to cancel a non-existing order that can be seen on the status output. In the logs the bot attempted to create 1 buy and 1 sell order but only the buy order was created successfully. As seen on the screenshot below the sell order was also seen open on the status output. After the order refresh time is met the bot now attempts to cancel this order but fails since it wasn't successfully created in the first place. Checking on the web app the sell order is not seen.
Errors received after attempts to cancel the non-existing order:
Steps To Reproduce
Test Result Comparison
N/A, new connector
Attachments
Logs and config: injective_perpetual_fail_cancel.zip