-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle ethflow_refunds empty table case (#2931)
# Description #2906 moved refund indexer maintenance into the solvable orders cache update loop. When there are no ethflow refunds in the DB or the last refund is very old, the refund indexer tries to fetch all the blocks, which might execute for more than 10 minutes, resulting in autopilot restarts and the whole protocol being stuck. # Changes Change the behavior of calculating the starting index for refund indexer. If a recent eth-flow refund exists within the last day, it prioritizes this. Otherwise, it falls back to the most recent block from broadcasted orders. Then select the highest value among the value calculated in the previous step, settlement contract block and configured `ethflow_indexing_start`. ## How to test Staging. <img width="598" alt="image" src="https://github.com/user-attachments/assets/fed96a1b-2523-4ca5-9fb4-767b8c87e536"> (cherry picked from commit 68815a3)
- Loading branch information
1 parent
d3e8690
commit d67a79f
Showing
3 changed files
with
129 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters