Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Context
@elena-zh create a TWAP tx that didn't get index in watch tower.
https://basescan.org/tx/0xa9e88af5dee1d51f217bbe7613e2897cec6b3d989e8f3cab5142aa74ccb96278#eventlog
I saw there was not logs for that transaction. Which is odd! I can see the event for conditional order created.
During my test, my transaction was indexed.
https://basescan.org/tx/0xf0a848e6899330e84e86160f079cf341b145b1fb2bbc2f7a8aec1dfb425384c9#eventlog
In principle both TX emit the same event, and should have been picked in the same way, but something was making us to skip some indexing of events
Cause
I reviewed the code and saw some changes applied 2 months ago were making us skip the indexing of events for some blocks.
See:
https://github.com/cowprotocol/watch-tower/pull/161/files#r1862591918
Solution
Bring back the code that skips the polling of tradable orders from the handlers, but leaves the indexing of conditional orders (so we don't miss an order creation and we can do the polling in a future block).