connext / vector

↗️ Vector is an ultra-minimal state channel network implementation.
MIT License
109 stars 44 forks source link

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

Closed jakekidd closed 3 years ago

jakekidd commented 3 years ago

The Problem

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

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