From cffada8598cc36f869376b9c9a873c9011e23748 Mon Sep 17 00:00:00 2001
From: jbhusson <jonah@elixxir.io>
Date: Thu, 23 Jun 2022 17:27:32 -0400
Subject: [PATCH] Add prints for debugging

---
 bindings/connect.go | 5 +++++
 connect/connect.go  | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bindings/connect.go b/bindings/connect.go
index 5d61f5baf..73887a9d3 100644
--- a/bindings/connect.go
+++ b/bindings/connect.go
@@ -2,6 +2,7 @@ package bindings
 
 import (
 	"encoding/json"
+	jww "github.com/spf13/jwalterweatherman"
 	"gitlab.com/elixxir/client/catalog"
 	"gitlab.com/elixxir/client/connect"
 	e2e2 "gitlab.com/elixxir/client/e2e"
@@ -35,16 +36,19 @@ func (c *Connection) GetId() int {
 // myIdentity - marshalled ReceptionIdentity object
 func (c *Cmix) Connect(e2eId int, recipientContact []byte) (
 	*Connection, error) {
+	jww.INFO.Printf("Connect(...) called") // TODO: remove me
 	cont, err := contact.Unmarshal(recipientContact)
 	if err != nil {
 		return nil, err
 	}
 
+	jww.INFO.Printf("Getting e2e client from singleton...") // TODO: remove me
 	e2eClient, err := e2eTrackerSingleton.get(e2eId)
 	if err != nil {
 		return nil, err
 	}
 
+	jww.INFO.Printf("Calling connect.Connect(...)") // TODO: remove me
 	p := connect.GetDefaultParams()
 	p.Timeout = 45 * time.Second
 	connection, err := connect.Connect(cont, e2eClient.api, p)
@@ -52,6 +56,7 @@ func (c *Cmix) Connect(e2eId int, recipientContact []byte) (
 		return nil, err
 	}
 
+	jww.INFO.Printf("Finishing with bindings.Connect") // TODO: remove me
 	return connectionTrackerSingleton.make(connection), nil
 }
 
diff --git a/connect/connect.go b/connect/connect.go
index e7d4d14c5..621ef8941 100644
--- a/connect/connect.go
+++ b/connect/connect.go
@@ -116,7 +116,7 @@ func GetParameters(params string) (Params, error) {
 // partner.Manager is confirmed.
 func Connect(recipient contact.Contact, e2eClient *xxdk.E2e,
 	p Params) (Connection, error) {
-
+	jww.INFO.Printf("connect.Connect(...) called") // TODO: remove me
 	// Build callback for E2E negotiation
 	signalChannel := make(chan Connection, 1)
 	cb := func(connection Connection) {
@@ -125,6 +125,7 @@ func Connect(recipient contact.Contact, e2eClient *xxdk.E2e,
 	callback := getAuthCallback(cb, nil, e2eClient.GetE2E(), e2eClient.GetAuth(), p)
 	e2eClient.GetAuth().AddPartnerCallback(recipient.ID, callback)
 
+	jww.INFO.Printf("Sending auth request...") // TODO: remove me
 	// Perform the auth request
 	_, err := e2eClient.GetAuth().Request(recipient, nil)
 	if err != nil {
-- 
GitLab