Remove polling of transaction status from the transaction tracker
Introduce a new state machine to bundle sender
Machine is driven by a "trigger" which depends on the bundling mode and the state
Each trigger causes a state update
State currently jumps between Building when there are no outstanding bundle transactions, and Pending when there are outstanding transactions.
Adds handling for nonce too low errors
TODO (in follow up PRs)
[x] Add a new state to handle "cancellations" where we replace any pending transactions with an empty transaction to fix the "stuck sender" and "replacement underpriced" cases.
[x] Add tests for the new state machine
[x] Add support for dropped transactions to certain senders to short circuit pending wait times if dropped.
Closes #362
Proposed Changes
Building
when there are no outstanding bundle transactions, andPending
when there are outstanding transactions.nonce too low
errorsTODO (in follow up PRs)