Skip to content

Commit

Permalink
fix: #122 fix: Panic if receive a UpdateL1InfoTreeV2 without previous…
Browse files Browse the repository at this point in the history
… UpdateL1InfoTree (#123)
  • Loading branch information
joanestebanr authored Oct 4, 2024
1 parent 046ee7b commit c7e7170
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions synchronizer/actions/banana/processor_update_l1_info_tree_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ func (p *ProcessorUpdateL1InfoTreeV2) ProcessUpdateL1InfoTreeV2(ctx context.Cont
log.Errorf("error getting the state leaf. Error: %v", err)
return err
}
err = compareL1InfoTreeLeaf(*stateLeaf, data)
if err != nil {
log.Errorf("error comparing the state leaf. Error: %v", err)
return err
if stateLeaf != nil {
err = compareL1InfoTreeLeaf(*stateLeaf, data)
if err != nil {
log.Errorf("error comparing the state leaf. Error: %v", err)
return err
}
log.Infof("L1InfoTreeLeafV2 sanity check OK: %s", data.String())
} else {
log.Warnf("this l1nfotree is not stored on local DB. So can't check it: data:%s ", data.String())
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

var (
Version = "v1.0.2"
Version = "v1.0.3"
)

// PrintVersion prints version info into the provided io.Writer.
Expand Down

0 comments on commit c7e7170

Please sign in to comment.