Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

handle event where nonce has expired and we are unable to confirm tx #646

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

jakekidd
Copy link
Contributor

@jakekidd jakekidd commented Jun 3, 2021

The Problem

We currently aren't erroring out properly for this specific case where:

  • nonce expires,
  • we proceed to poll for receipt in waitForConfirmation
  • we time out, leading us to
  • bump the tx (even though the nonce has expired).

Why are we unable to get a receipt in waitForConfirmation if the nonce is expired? Shouldn't that imply that the tx is mined, and there's no reason we should be unable to get the receipt? I don't know, because we're not erroring out properly in those cases. This is just a step to prevent unnecessary gas bumping on a dead tx.

The Solution

Using a flag, nonceExpired, if we get a timeout with the flag raised then we error out properly

@jakekidd jakekidd requested review from LayneHaber and rhlsthrm and removed request for LayneHaber June 3, 2021 02:15
@jakekidd jakekidd merged commit 681e0e1 into main Jun 7, 2021
@jakekidd jakekidd deleted the expired-nonce branch June 7, 2021 22:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants