Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
cffada85
Commit
cffada85
authored
2 years ago
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
Add prints for debugging
parent
73731b08
No related branches found
No related tags found
2 merge requests
!510
Release
,
!249
Increase bindings timeout in cmix params to 45 seconds
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/connect.go
+5
-0
5 additions, 0 deletions
bindings/connect.go
connect/connect.go
+2
-1
2 additions, 1 deletion
connect/connect.go
with
7 additions
and
1 deletion
bindings/connect.go
+
5
−
0
View file @
cffada85
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
connect/connect.go
+
2
−
1
View file @
cffada85
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment