Skip to content
Snippets Groups Projects
Commit cffada85 authored by Jonah Husson's avatar Jonah Husson
Browse files

Add prints for debugging

parent 73731b08
No related branches found
No related tags found
2 merge requests!510Release,!249Increase bindings timeout in cmix params to 45 seconds
......@@ -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
}
......
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment