forked from gakonst/ethers-rs
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(escalator): improve error handling (#21)
seeing two types of errors in the escalator that we don't handle well: https://cloudlogging.app.goo.gl/weesjEZT3GuREEUu6 the default behaviour is to shut down the escalator for that chain if an unexpected error occurs, which isn't what we want, so I'm releasing a new PR to: - drop the erroring tx instead of shutting down the escalator, if the error is unknown - handle the "transaction underpriced" error: means the gas escalation was insufficient, so the tx is re-added to the monitored tx list with its old timestamp (but its new gas price), to be re-escalated again - handle the "already known" error: not sure why this one happens - it means the same identical tx was submitted twice to the mempool. In this case we re-add it to the escalator monitor, since we're not yet sure it landed onchain As a drive-by change, I realised that if the RPC briefly fails, the escalator monitor will shut down; now we catch any errors, log them, and keep trying to escalate instead of terminating
- Loading branch information
1 parent
12f9681
commit d22cecc
Showing
1 changed file
with
57 additions
and
19 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