Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 committed Mar 22, 2024
1 parent 8b3a7c4 commit 392b570
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions driver/chain_syncer/calldata/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,11 @@ func (s *Syncer) checkLastVerifiedBlockMismatch(ctx context.Context) (*rpc.Reorg
}

// retrievePastBlock find proper L1 header and L2 block id to reset when there is a mismatch
func (s *Syncer) retrievePastBlock(ctx context.Context, blockID uint64, retries uint64, genesisL1Header *types.Header) (*rpc.ReorgCheckResult, error) {
func (s *Syncer) retrievePastBlock(
ctx context.Context,
blockID uint64,
retries uint64,
genesisL1Header *types.Header) (*rpc.ReorgCheckResult, error) {
if retries > s.maxRetrieveExponent {
return &rpc.ReorgCheckResult{
IsReorged: true,
Expand Down Expand Up @@ -593,7 +597,9 @@ func (s *Syncer) retrievePastBlock(ctx context.Context, blockID uint64, retries
l1Origin, err := s.rpc.L2.L1OriginByID(ctx, new(big.Int).SetUint64(currentBlockID))
if err != nil {
if err.Error() == ethereum.NotFound.Error() {
log.Info("L1Origin not found in retrievePastBlock because the L2 EE is just synced through P2P", "blockID", currentBlockID)
log.Info("L1Origin not found in retrievePastBlock because the L2 EE is just synced through P2P",
"blockID",
currentBlockID)
// Can't find l1Origin in L2 EE, so we call the contract to get block info
blockInfo, err := s.rpc.TaikoL1.GetBlock(&bind.CallOpts{Context: ctx}, currentBlockID)
if err != nil {
Expand Down

0 comments on commit 392b570

Please sign in to comment.