Skip to content

Commit bfb6607

Browse files
ffranrguggero
authored andcommitted
proof+itest: improve log and error messages
1 parent 7fc716c commit bfb6607

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

itest/test_harness.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ func setupHarnesses(t *testing.T, ht *harnessTest,
327327
// If nothing is specified, we use the universe RPC proof courier by
328328
// default.
329329
default:
330+
t.Logf("Address of universe server as proof courier: %v",
331+
universeServer.service.rpcHost())
330332
proofCourier = universeServer
331333
}
332334

proof/courier.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ func (b *BackoffHandler) Exec(ctx context.Context, proofLocator Locator,
654654
if err != nil {
655655
return err
656656
}
657-
log.Infof("Starting proof transfer backoff procedure for proof "+
657+
log.Infof("Starting proof transfer backoff procedure "+
658658
"(transfer_type=%s, locator_hash=%x)", transferType,
659659
locatorHash[:])
660660

@@ -710,7 +710,7 @@ func (b *BackoffHandler) Exec(ctx context.Context, proofLocator Locator,
710710
)
711711
subscriberEvent(waitEvent)
712712

713-
log.Debugf("Proof delivery failed with error. Backing off. "+
713+
log.Debugf("Proof transfer failed with error. Backing off. "+
714714
"(transfer_type=%s, locator_hash=%x, backoff=%s, "+
715715
"attempt=%d): %v",
716716
transferType, locatorHash[:], backoff, i, errExec)
@@ -742,7 +742,7 @@ func (b *BackoffHandler) wait(ctx context.Context, wait time.Duration) error {
742742
case <-time.After(wait):
743743
return nil
744744
case <-ctx.Done():
745-
return fmt.Errorf("context canceled")
745+
return fmt.Errorf("back off handler context done")
746746
}
747747
}
748748

@@ -1423,8 +1423,8 @@ func (c *UniverseRpcCourier) ReceiveProof(ctx context.Context,
14231423
err := c.ensureConnect(ctx)
14241424
if err != nil {
14251425
return fmt.Errorf("unable to connect to "+
1426-
"courier service during delivery "+
1427-
"attempt: %w", err)
1426+
"universe RPC courier service during "+
1427+
"recieve attempt: %w", err)
14281428
}
14291429

14301430
// Retrieve proof from courier.

0 commit comments

Comments
 (0)