@@ -304,7 +304,7 @@ func (s *SimpleSyncer) syncRoot(ctx context.Context, remoteRoot Root,
304
304
305
305
// Now that we know where the divergence is, we can fetch the issuance
306
306
// proofs from the remote party.
307
- err = fn .ParSlice (
307
+ fetchErrs , err : = fn .ParSliceErrCollect (
308
308
ctx , keysToFetch , func (ctx context.Context , key LeafKey ) error {
309
309
newProof , err := diffEngine .FetchProofLeaf (
310
310
ctx , uniID , key ,
@@ -320,8 +320,9 @@ func (s *SimpleSyncer) syncRoot(ctx context.Context, remoteRoot Root,
320
320
// given.
321
321
validRoot := leafProof .VerifyRoot (remoteRoot )
322
322
if ! validRoot {
323
- return fmt .Errorf ("proof for key=%v is " +
324
- "invalid" , spew .Sdump (key ))
323
+ return fmt .Errorf ("proof leaf failed " +
324
+ "universe root verification " +
325
+ "(leaf_key=%v)" , spew .Sdump (key ))
325
326
}
326
327
327
328
// If this is an issuance proof, then we can send
@@ -379,6 +380,13 @@ func (s *SimpleSyncer) syncRoot(ctx context.Context, remoteRoot Root,
379
380
return err
380
381
}
381
382
383
+ // Report any errors encountered while fetching the leaves.
384
+ for idx , fetchErr := range fetchErrs {
385
+ leafKey := keysToFetch [idx ]
386
+ log .Errorf ("Error fetching leaf (leaf_key=%x): %v" ,
387
+ leafKey .UniverseKey (), fetchErr )
388
+ }
389
+
382
390
// We use an error group to simply the error handling of a goroutine.
383
391
// This goroutine will handle reading in batches of new leaves to
384
392
// insert into the DB. We'll fee the output of the goroutines below
0 commit comments