There should be a way to test overwriting pending transactions
See original GitHub issueWith the current functionality of Ganache Core, if you try to broadcast a transaction with a higher fee that has already been broadcast with the same nonce, you will receive the following error the tx doesn't have the correct nonce. account has nonce of: 1 tx has nonce of: 0
.
This is because it verifies the nonce itself before running against the vm https://github.com/trufflesuite/ganache-core/blob/283cbeca1cf9f9c598845a00baaa331afc621596/lib/statemanager.js#L965
ganache-core
does not currently support a mempool
, although this WIP refactor by @davidmurdoch does support a mempool to some degree https://github.com/trufflesuite/ganache-core/blob/a4e8989efc301b28d094082297dfbb1c4b25a744/src/ledgers/ethereum/components/transaction-pool.ts#L80-L87
A feature like this is incredibly important for DApp developers. Especially ones creating time sensitive DApps that need to ensure parties can overwrite pending transactions.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:20 (11 by maintainers)
Top GitHub Comments
upvote +1
100% this feature is imperative for testing complicated pending and cancelling scenarios.