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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
723c260e
Commit
723c260e
authored
Jun 24, 2022
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Fix critical messages and add some debug logging in the CLI
parent
9b7c24df
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!510
Release
,
!250
Hotfix/refactor connect
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/root.go
+20
-2
20 additions, 2 deletions
cmd/root.go
e2e/critical.go
+1
-0
1 addition, 0 deletions
e2e/critical.go
e2e/manager.go
+1
-1
1 addition, 1 deletion
e2e/manager.go
with
22 additions
and
3 deletions
cmd/root.go
+
20
−
2
View file @
723c260e
...
...
@@ -15,7 +15,6 @@ import (
"encoding/json"
"errors"
"fmt"
"gitlab.com/elixxir/client/storage/user"
"io/fs"
"io/ioutil"
"log"
...
...
@@ -26,6 +25,8 @@ import (
"sync"
"time"
"gitlab.com/elixxir/client/storage/user"
"gitlab.com/elixxir/client/backup"
"gitlab.com/elixxir/client/e2e"
"gitlab.com/elixxir/client/xxdk"
...
...
@@ -195,6 +196,8 @@ var rootCmd = &cobra.Command{
client
:=
initClient
()
jww
.
INFO
.
Printf
(
"Client Initialized..."
)
user
:=
client
.
GetUser
()
jww
.
INFO
.
Printf
(
"USERPUBKEY: %s"
,
user
.
E2eDhPublicKey
.
TextVerbose
(
16
,
0
))
...
...
@@ -219,14 +222,21 @@ var rootCmd = &cobra.Command{
recipientContact
=
user
.
GetContact
()
}
jww
.
INFO
.
Printf
(
"Client: %s, Partner: %s"
,
user
.
ReceptionID
,
recipientID
)
client
.
GetE2E
()
.
EnableUnsafeReception
()
recvCh
:=
registerMessageListener
(
client
)
jww
.
INFO
.
Printf
(
"Starting Network followers..."
)
err
:=
client
.
StartNetworkFollower
(
5
*
time
.
Second
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"%+v"
,
err
)
}
jww
.
INFO
.
Printf
(
"Network followers started!"
)
// Wait until connected or crash on timeout
connected
:=
make
(
chan
bool
,
10
)
client
.
GetCmix
()
.
AddHealthCallback
(
...
...
@@ -244,6 +254,8 @@ var rootCmd = &cobra.Command{
// 85% of the nodes
numReg
:=
1
total
:=
100
jww
.
INFO
.
Printf
(
"Registering with nodes..."
)
for
numReg
<
(
total
*
3
)
/
4
{
time
.
Sleep
(
1
*
time
.
Second
)
numReg
,
total
,
err
=
client
.
GetNodeRegistrationStatus
()
...
...
@@ -256,6 +268,8 @@ var rootCmd = &cobra.Command{
client
.
GetBackupContainer
()
.
TriggerBackup
(
"Integration test."
)
jww
.
INFO
.
Printf
(
"Client backup triggered..."
)
// Send Messages
msgBody
:=
viper
.
GetString
(
"message"
)
time
.
Sleep
(
10
*
time
.
Second
)
...
...
@@ -376,6 +390,8 @@ var rootCmd = &cobra.Command{
paramsE2E
.
ExcludedRounds
=
excludedRounds
.
NewSet
()
}
jww
.
INFO
.
Printf
(
"Client Sending messages..."
)
wg
:=
&
sync
.
WaitGroup
{}
sendCnt
:=
int
(
viper
.
GetUint
(
"sendCount"
))
wg
.
Add
(
sendCnt
)
...
...
@@ -455,6 +471,8 @@ var rootCmd = &cobra.Command{
waitTimeout
:=
time
.
Duration
(
waitSecs
)
*
time
.
Second
done
:=
false
jww
.
INFO
.
Printf
(
"Client receiving messages..."
)
for
!
done
&&
expectedCnt
!=
0
{
timeoutTimer
:=
time
.
NewTimer
(
waitTimeout
)
select
{
...
...
@@ -511,7 +529,7 @@ var rootCmd = &cobra.Command{
if
profileOut
!=
""
{
pprof
.
StopCPUProfile
()
}
jww
.
INFO
.
Printf
(
"Client exiting!"
)
},
}
...
...
This diff is collapsed.
Click to expand it.
e2e/critical.go
+
1
−
0
View file @
723c260e
...
...
@@ -53,6 +53,7 @@ func newCritical(kv *versioned.KV, hm func(f func(bool)) uint64,
E2eMessageBuffer
:
cm
,
trigger
:
make
(
chan
bool
,
100
),
send
:
send
,
healthcb
:
hm
,
}
return
c
...
...
This diff is collapsed.
Click to expand it.
e2e/manager.go
+
1
−
1
View file @
723c260e
...
...
@@ -165,7 +165,7 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
critcalNetworkStopper
:=
stoppable
.
NewSingle
(
"e2eCriticalMessagesStopper"
)
m
.
crit
.
runCriticalMessages
(
critcalNetworkStopper
,
go
m
.
crit
.
runCriticalMessages
(
critcalNetworkStopper
,
m
.
net
.
GetInstance
()
.
GetRoundEvents
())
multi
.
Add
(
critcalNetworkStopper
)
...
...
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