1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00

cap resubmit transaction retries to within 50 blocks of first submission (#12003)

This commit is contained in:
Alex Donesky 2021-09-02 16:06:31 -05:00 committed by GitHub
parent 2df159841a
commit da305656bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}