Commit 4396e187 authored by Kelvin Fichter's avatar Kelvin Fichter

fix(dtl): sync beyond deposit shutoff block

Fixes a bug in the DTL that caused it to not be able to sync beyond the
deposit shutoff block. This would happen because the TO block would be
less than the FROM block which would cause certain providers to throw an
error.
parent d8e328ae
---
'@eth-optimism/data-transport-layer': patch
---
Fixes a bug in the DTL that would cause it to not be able to sync beyond the deposit shutoff block.
......@@ -268,16 +268,16 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
)
}
// I prefer to do this in serial to avoid non-determinism. We could have a discussion about
// using Promise.all if necessary, but I don't see a good reason to do so unless parsing is
// really, really slow for all event types.
await this._syncEvents(
'CanonicalTransactionChain',
'TransactionEnqueued',
highestSyncedL1Block,
depositTargetL1Block,
handleEventsTransactionEnqueued
)
// We should not sync TransactionEnqueued events beyond the deposit shutoff block.
if (depositTargetL1Block >= highestSyncedL1Block) {
await this._syncEvents(
'CanonicalTransactionChain',
'TransactionEnqueued',
highestSyncedL1Block,
depositTargetL1Block,
handleEventsTransactionEnqueued
)
}
await this._syncEvents(
'CanonicalTransactionChain',
......
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