I want my dApp to automatically rebroadcast a transaction if after 50 blocks it is still unmined. How can I do this in javascript with web3 1, having all infos about the pending one? (txHash, ecc)
Asked
Active
Viewed 2,559 times
2 Answers
0
I found that it can be done by performing web3.eth.sendTransaction again and using the same nonce parameter.
Maxim Gaina
- 151
- 2
- 9
0
You can repeat the transaction, sending transaction with the same nonce. Note that you'd better place a bigger fee on it (10%+). You can also try changing the transaction's original nonce, e.g., incrementing nonce value by one. You can find some additional info here.
Garen Vartanian
- 483
- 3
- 14
Sovan
- 123
- 2
- 8
gasparameter in your transaction object. If you are willing to do it in loop, be sure to set the limit so the fee will not accidentially become too high. And also if your answer answers your question accept it by clicking check mark below down vote of your answer. – Roman Frolov Jan 13 '18 at 14:49