question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There should be a way to test overwriting pending transactions

See original GitHub issue

With 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:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

5reactions
jacko125commented, Feb 25, 2020

upvote +1

5reactions
jjgonecryptocommented, Feb 24, 2020

100% this feature is imperative for testing complicated pending and cancelling scenarios.

Read more comments on GitHub >

github_iconTop Results From Across the Web

There should be a way to test overwriting pending transactions
100% this feature is imperative for testing complicated pending and cancelling scenarios. 3
Read more >
Canceling / overwriting a pending transaction using geth ...
Check what transactions are pending (these are the ones blocking the whole thing) eth.pendingTransactions . This will return all the pending transactions. One ......
Read more >
How to replace a Pending/Dropped transaction
Replacing a Transaction. To replace an Ethereum transaction, first, make sure that the transaction is still pending. Check its transaction ...
Read more >
Fixing Stuck Pending Transactions on MetaMask
This method works by essentially overwriting the stuck transaction with another, higher-priority transaction. 1. Enable Customized Transaction Nonce.
Read more >
Pending Transactions on Ethereum | Bitcoin.com Support Center
Note the transaction status (eg. Pending, Confirmed). Double-check the transaction status by tapping "View transaction on the block explorer." This will take ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found