Skip to content

Commit

Permalink
fix(dtl): sync bug when addresses change
Browse files Browse the repository at this point in the history
Fixes a bug in the DTL that would break sync when addresses are changed
in the AddressManager. Slightly reduces complexity at the same time by
removing an additional request.
  • Loading branch information
smartcontracts committed Aug 17, 2022
1 parent e4ef92a commit 3dac8f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/weak-moose-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/data-transport-layer': patch
---

Fixes a bug that would break DTL sync when addresses are changed
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,7 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
let l1BlockRangeStart = fromL1Block
for (const addressSetEvent of addressSetEvents) {
eventRanges.push({
address: await this._getContractAddressAtBlock(
contractName,
addressSetEvent.blockNumber
),
address: addressSetEvent.args._oldAddress,
fromBlock: l1BlockRangeStart,
toBlock: addressSetEvent.blockNumber,
})
Expand Down

0 comments on commit 3dac8f0

Please sign in to comment.