From 75b8baafb6f2e9a38a52d46c71c6dcca03635886 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 21 Dec 2017 13:40:04 -0800 Subject: [PATCH 1/3] Stop failing pending transactions after any period of time --- app/scripts/lib/pending-tx-tracker.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js index dc6e526fd..7956a3329 100644 --- a/app/scripts/lib/pending-tx-tracker.js +++ b/app/scripts/lib/pending-tx-tracker.js @@ -23,7 +23,6 @@ module.exports = class PendingTransactionTracker extends EventEmitter { this.query = new EthQuery(config.provider) this.nonceTracker = config.nonceTracker // default is one day - this.retryTimePeriod = config.retryTimePeriod || 86400000 this.getPendingTransactions = config.getPendingTransactions this.getCompletedTransactions = config.getCompletedTransactions this.publishTransaction = config.publishTransaction @@ -106,12 +105,6 @@ module.exports = class PendingTransactionTracker extends EventEmitter { this.emit('tx:block-update', txMeta, latestBlockNumber) } - if (Date.now() > txMeta.time + this.retryTimePeriod) { - const hours = (this.retryTimePeriod / 3.6e+6).toFixed(1) - const err = new Error(`Gave up submitting after ${hours} hours.`) - return this.emit('tx:failed', txMeta.id, err) - } - const firstRetryBlockNumber = txMeta.firstRetryBlockNumber || latestBlockNumber const txBlockDistance = Number.parseInt(latestBlockNumber, 16) - Number.parseInt(firstRetryBlockNumber, 16) From 24e10e874eebeef8f75ad75507738a0dd0928fb6 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 21 Dec 2017 13:41:44 -0800 Subject: [PATCH 2/3] Bump changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8952236d0..3c1c1dcb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Fix bug that prevented updating custom token details. +- No longer mark long-pending transactions as failed, since we now have button to retry with higher gas. ## 3.13.3 2017-12-14 From 33dbee3db9f6d66777039579789f36618c95c5fe Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 21 Dec 2017 14:15:17 -0800 Subject: [PATCH 3/3] Remove retryTimePeriod from tx controller --- app/scripts/controllers/transactions.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index f95b5e39a..7c7efb84d 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -59,7 +59,6 @@ module.exports = class TransactionController extends EventEmitter { this.pendingTxTracker = new PendingTransactionTracker({ provider: this.provider, nonceTracker: this.nonceTracker, - retryTimePeriod: 86400000, // Retry 3500 blocks, or about 1 day. publishTransaction: (rawTx) => this.query.sendRawTransaction(rawTx), getPendingTransactions: this.txStateManager.getPendingTransactions.bind(this.txStateManager), getCompletedTransactions: this.txStateManager.getConfirmedTransactions.bind(this.txStateManager),