mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 07:16:36 +01:00
cap resubmit transaction retries to within 50 blocks of first submission (#12003)
This commit is contained in:
parent
2df159841a
commit
da305656bd
@ -136,8 +136,8 @@ export default class PendingTransactionTracker extends EventEmitter {
|
|||||||
|
|
||||||
const retryCount = txMeta.retryCount || 0;
|
const retryCount = txMeta.retryCount || 0;
|
||||||
|
|
||||||
// Exponential backoff to limit retries at publishing
|
// Exponential backoff to limit retries at publishing (capped at ~15 minutes between retries)
|
||||||
if (txBlockDistance <= Math.pow(2, retryCount) - 1) {
|
if (txBlockDistance < Math.min(50, Math.pow(2, retryCount))) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user