Commit c520100d authored by Karl Floersch's avatar Karl Floersch Committed by GitHub

fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset
parent 85362d44
---
'@eth-optimism/batch-submitter': patch
---
Fix a bug in fixMonotonicity auto healer
...@@ -573,12 +573,8 @@ export class TransactionBatchSubmitter extends BatchSubmitter { ...@@ -573,12 +573,8 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
oldBlockNumber: ele.blockNumber, oldBlockNumber: ele.blockNumber,
newBlockNumber: earliestBlockNumber, newBlockNumber: earliestBlockNumber,
}) })
fixedBatch.push({ ele.timestamp = earliestTimestamp
...ele, ele.blockNumber = earliestBlockNumber
timestamp: earliestTimestamp,
blockNumber: earliestBlockNumber,
})
continue
} }
// Fix the element if its timestammp/blockNumber is too large // Fix the element if its timestammp/blockNumber is too large
if ( if (
...@@ -591,14 +587,11 @@ export class TransactionBatchSubmitter extends BatchSubmitter { ...@@ -591,14 +587,11 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
oldBlockNumber: ele.blockNumber, oldBlockNumber: ele.blockNumber,
newBlockNumber: latestBlockNumber, newBlockNumber: latestBlockNumber,
}) })
fixedBatch.push({ ele.timestamp = latestTimestamp
...ele, ele.blockNumber = latestBlockNumber
timestamp: latestTimestamp,
blockNumber: latestBlockNumber,
})
continue
} }
// No fixes needed! earliestTimestamp = ele.timestamp
earliestBlockNumber = ele.blockNumber
fixedBatch.push(ele) fixedBatch.push(ele)
} }
return fixedBatch return fixedBatch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment