Skip to content

Commit

Permalink
Fail with error instead of panic
Browse files Browse the repository at this point in the history
This could happen if the wrong verifier key was provided.
  • Loading branch information
mhutchinson authored Dec 2, 2024
2 parents da4884c + 9d2db1d commit d58df23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ func (c *Controller) SelectLog(o string) {

func (c *Controller) InitFromLog() {
c.RefreshCheckpoint()
if c.Model.GetCheckpoint() != nil && c.Model.GetCheckpoint().Size > 0 {
size := c.Model.GetCheckpoint().Size
if err := c.Model.GetError(); err != nil {
klog.Exit(err)
}
if cp := c.Model.GetCheckpoint(); cp != nil && cp.Size > 0 {
size := cp.Size
c.GetLeaf(size, size-1)
}
}
Expand Down

0 comments on commit d58df23

Please sign in to comment.