This commit is contained in:
colinlyguo
2023-12-19 14:52:18 +08:00
parent 5de976ceef
commit dc4c6c39b1
2 changed files with 2 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ func (c *L1MessageFetcher) fetchAndSaveEvents(confirmation uint64) {
to = endHeight
}
if c.l1SyncHeight+logic.L1ReorgSafeDepth > endHeight {
if c.l1SyncHeight+logic.L1ReorgSafeDepth*2 > endHeight {
isReorg, resyncHeight, handleErr := c.l1ReorgHandlingLogic.HandleL1Reorg(c.ctx, c.l1SyncHeight, c.l1LastSyncBlockHash)
if handleErr != nil {
log.Error("failed to Handle L1 Reorg", "err", handleErr)

View File

@@ -96,7 +96,7 @@ func (c *L2MessageFetcher) fetchAndSaveEvents(confirmation uint64) {
to = endHeight
}
if c.syncInfo.GetL2SyncHeight()+logic.L2ReorgSafeDepth > endHeight {
if c.syncInfo.GetL2SyncHeight()+logic.L2ReorgSafeDepth*2 > endHeight {
isReorg, resyncHeight, handleErr := c.l2ReorgHandlingLogic.HandleL2Reorg(c.ctx, c.syncInfo.GetL2SyncHeight(), c.l2LastSyncBlockHash)
if handleErr != nil {
log.Error("failed to Handle L2 Reorg", "err", handleErr)