Skip to content

Commit

Permalink
test: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Sep 16, 2024
1 parent 0e0172c commit 5d717fa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions l1infotreesync/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,17 @@ func (p *processor) ProcessBlock(ctx context.Context, b sync.Block) error {
var initialL1InfoIndex uint32
var l1InfoLeavesAdded uint32
lastIndex, err := p.getLastIndex(tx)
if errors.Is(err, ErrNotFound) {

switch {
case errors.Is(err, ErrNotFound):
initialL1InfoIndex = 0
err = nil
} else if err != nil {
case err != nil:
return fmt.Errorf("err: %w", err)
} else {
default:
initialL1InfoIndex = lastIndex + 1
}

for _, e := range b.Events {
event, ok := e.(Event)
if !ok {
Expand Down

0 comments on commit 5d717fa

Please sign in to comment.