Closed anxolin closed 1 year ago
CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
You can retrigger this bot by commenting recheck in this Pull Request
The unit tests are broken :/
Unit tests are still failing. Seems like something with the dependencies?
@alfetopito worked for me. will review š
Test are ā GREEN!
@alfetopito merging, let me know if you have any other comments
This PR adds a 2 things:
1) A new check, after we get the order that "should" be created, we double-check if it was already created or not by quering the orderbook.
2) After we verify the existence of the order, the polling will return by default
TRY_NEXT_BLOCK
, but at the same time it will give the concrete order to give a different result. This will allow orders like Twap to say: "Ok, so if current part is already created, next part should be starting by this exact time, therefore it will return aTRY_AT_EPOCH
overridingTRY_NEXT_BLOCK
default).This will allow orders to be polled much more efficiently, for example, DCA that trades once a month, you will not need to check every block between two months.
Also, another efficiency, is that watch towers will not need to post the orders if someone else already posted it, reducing drastically the errors of
DuplicatedOrder
.Not included
Next PRs I plan to add: