@@ -347,26 +347,30 @@ func (v *MMDVerifier) Run(ctx context.Context) {
347
347
Hash : checkpoint .Hash ,
348
348
}, v .tracker .TileFetcher )
349
349
if err != nil {
350
- panic (fmt .Sprintf ("Failed to create proof builder: %v" , err ))
350
+ v .errChan <- fmt .Errorf ("failed to create proof builder: %v" , err )
351
+ continue
351
352
}
352
353
}
353
354
354
- // Panic if the following logic hits any error.
355
355
ip , err := proofBuilder .InclusionProof (ctx , leafMMD .index )
356
356
if err != nil {
357
- panic (fmt .Sprintf ("Failed to create inclusion proof: %v" , err ))
357
+ v .errChan <- fmt .Errorf ("failed to create inclusion proof: %v" , err )
358
+ continue
358
359
}
359
360
certs , err := x509 .ParseCertificates (leafMMD .leaf )
360
361
if err != nil {
361
- panic (fmt .Sprintf ("Failed to parse certificates: %v" , err ))
362
+ v .errChan <- fmt .Errorf ("failed to parse certificates: %v" , err )
363
+ continue
362
364
}
363
365
entry , err := entryFromChain (certs , false , leafMMD .timestamp )
364
366
if err != nil {
365
- panic (fmt .Sprintf ("Failed to create entry from chain: %v" , err ))
367
+ v .errChan <- fmt .Errorf ("failed to create entry from chain: %v" , err )
368
+ continue
366
369
}
367
370
leafHash := entry .MerkleLeafHash (leafMMD .index )
368
371
if err := proof .VerifyInclusion (hasher .DefaultHasher , leafMMD .index , checkpoint .Size , leafHash , ip , checkpoint .Hash ); err != nil {
369
- panic (fmt .Sprintf ("Failed to verify inclusion proof: %v" , err ))
372
+ v .errChan <- fmt .Errorf ("failed to verify inclusion proof: %v" , err )
373
+ continue
370
374
}
371
375
372
376
leafMMD = nil
0 commit comments