From da305656bd7e9a7ba7afedd9d1cbdafb91f58b2e Mon Sep 17 00:00:00 2001 From: Alex Donesky Date: Thu, 2 Sep 2021 16:06:31 -0500 Subject: [PATCH] cap resubmit transaction retries to within 50 blocks of first submission (#12003) --- app/scripts/controllers/transactions/pending-tx-tracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.js b/app/scripts/controllers/transactions/pending-tx-tracker.js index 52e686cf6..96e7d9793 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.js @@ -136,8 +136,8 @@ export default class PendingTransactionTracker extends EventEmitter { const retryCount = txMeta.retryCount || 0; - // Exponential backoff to limit retries at publishing - if (txBlockDistance <= Math.pow(2, retryCount) - 1) { + // Exponential backoff to limit retries at publishing (capped at ~15 minutes between retries) + if (txBlockDistance < Math.min(50, Math.pow(2, retryCount))) { return undefined; }