fix replacement bug
This commit is contained in:
parent
0dd0823423
commit
44909ef188
@ -1,7 +1,7 @@
|
|||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
version: '1.1',
|
version: '1.2',
|
||||||
netId: Number(process.env.NET_ID) || 42,
|
netId: Number(process.env.NET_ID) || 42,
|
||||||
redisUrl: process.env.REDIS_URL,
|
redisUrl: process.env.REDIS_URL,
|
||||||
rpcUrl: process.env.RPC_URL || 'https://kovan.infura.io/',
|
rpcUrl: process.env.RPC_URL || 'https://kovan.infura.io/',
|
||||||
|
@ -153,7 +153,8 @@ async function sendTx(tx, done, retryAttempt = 1) {
|
|||||||
console.log('error', e.message)
|
console.log('error', e.message)
|
||||||
if(e.message === 'Returned error: Transaction gas price supplied is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.'
|
if(e.message === 'Returned error: Transaction gas price supplied is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce.'
|
||||||
|| e.message === 'Returned error: Transaction nonce is too low. Try incrementing the nonce.'
|
|| e.message === 'Returned error: Transaction nonce is too low. Try incrementing the nonce.'
|
||||||
|| e.message === 'Returned error: nonce too low') {
|
|| e.message === 'Returned error: nonce too low'
|
||||||
|
|| e.message === 'Returned error: replacement transaction underpriced') {
|
||||||
console.log('nonce too low, retrying')
|
console.log('nonce too low, retrying')
|
||||||
if(retryAttempt <= 10) {
|
if(retryAttempt <= 10) {
|
||||||
retryAttempt++
|
retryAttempt++
|
||||||
|
Loading…
Reference in New Issue
Block a user