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
648f3979
Commit
648f3979
authored
Oct 6, 2020
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Working reception
parent
68b59833
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
api/send.go
+1
-1
1 addition, 1 deletion
api/send.go
cmd/root.go
+2
-1
2 additions, 1 deletion
cmd/root.go
network/follow.go
+1
-5
1 addition, 5 deletions
network/follow.go
network/message/handler.go
+1
-0
1 addition, 0 deletions
network/message/handler.go
with
5 additions
and
7 deletions
api/send.go
+
1
−
1
View file @
648f3979
...
@@ -37,7 +37,7 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round,
...
@@ -37,7 +37,7 @@ func (c *Client) SendUnsafe(m message.Send, param params.Unsafe) ([]id.Round,
// if it fails.
// if it fails.
func
(
c
*
Client
)
SendCMIX
(
msg
format
.
Message
,
param
params
.
CMIX
)
(
id
.
Round
,
func
(
c
*
Client
)
SendCMIX
(
msg
format
.
Message
,
param
params
.
CMIX
)
(
id
.
Round
,
error
)
{
error
)
{
jww
.
INFO
.
Printf
(
"SendCMIX(%
v
)"
,
msg
)
jww
.
INFO
.
Printf
(
"SendCMIX(%
s
)"
,
string
(
msg
.
GetContents
())
)
return
c
.
network
.
SendCMIX
(
msg
,
param
)
return
c
.
network
.
SendCMIX
(
msg
,
param
)
}
}
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
2
−
1
View file @
648f3979
...
@@ -178,7 +178,8 @@ var rootCmd = &cobra.Command{
...
@@ -178,7 +178,8 @@ var rootCmd = &cobra.Command{
done
=
true
done
=
true
break
break
case
m
:=
<-
recvCh
:
case
m
:=
<-
recvCh
:
fmt
.
Printf
(
"Message received: %v"
,
m
)
fmt
.
Printf
(
"Message received: %s"
,
string
(
m
.
Payload
))
break
break
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
network/follow.go
+
1
−
5
View file @
648f3979
...
@@ -62,7 +62,7 @@ var followCnt int = 0
...
@@ -62,7 +62,7 @@ var followCnt int = 0
// executes each iteration of the follower
// executes each iteration of the follower
func
(
m
*
manager
)
follow
(
rng
csprng
.
Source
,
comms
followNetworkComms
)
{
func
(
m
*
manager
)
follow
(
rng
csprng
.
Source
,
comms
followNetworkComms
)
{
jww
.
INFO
.
Printf
(
"follow: %d"
,
followCnt
)
jww
.
TRACE
.
Printf
(
"follow: %d"
,
followCnt
)
followCnt
++
followCnt
++
//randomly select a gateway to poll
//randomly select a gateway to poll
...
@@ -148,8 +148,4 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
...
@@ -148,8 +148,4 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
// messages for the user (bloom not implemented yet)
// messages for the user (bloom not implemented yet)
checkedRounds
.
RangeUncheckedMasked
(
gwRoundsState
,
roundChecker
,
checkedRounds
.
RangeUncheckedMasked
(
gwRoundsState
,
roundChecker
,
int
(
m
.
param
.
MaxCheckedRounds
))
int
(
m
.
param
.
MaxCheckedRounds
))
wr
:=
m
.
Instance
.
GetWaitingRounds
()
jww
.
INFO
.
Printf
(
"WaitingRounds: %+v, %d"
,
wr
.
GetSlice
(),
wr
.
Len
())
}
}
This diff is collapsed.
Click to expand it.
network/message/handler.go
+
1
−
0
View file @
648f3979
...
@@ -62,6 +62,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message) {
...
@@ -62,6 +62,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message) {
}
else
{
}
else
{
// if it doesnt match any form of encrypted, hear it as a raw message
// if it doesnt match any form of encrypted, hear it as a raw message
// and add it to garbled messages to be handled later
// and add it to garbled messages to be handled later
msg
=
ecrMsg
raw
:=
message
.
Receive
{
raw
:=
message
.
Receive
{
Payload
:
msg
.
GetRawContents
(),
Payload
:
msg
.
GetRawContents
(),
MessageType
:
message
.
Raw
,
MessageType
:
message
.
Raw
,
...
...
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