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 {
oldBlockNumber: ele.blockNumber,
newBlockNumber: earliestBlockNumber,
})
fixedBatch.push({
...ele,
timestamp: earliestTimestamp,
blockNumber: earliestBlockNumber,
})
continue
ele.timestamp = earliestTimestamp
ele.blockNumber = earliestBlockNumber
}
// Fix the element if its timestammp/blockNumber is too large
if (
......@@ -591,14 +587,11 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
oldBlockNumber: ele.blockNumber,
newBlockNumber: latestBlockNumber,
})
fixedBatch.push({
...ele,
timestamp: latestTimestamp,
blockNumber: latestBlockNumber,
})
continue
ele.timestamp = latestTimestamp
ele.blockNumber = latestBlockNumber
}
// No fixes needed!
earliestTimestamp = ele.timestamp
earliestBlockNumber = ele.blockNumber
fixedBatch.push(ele)
}
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