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
82bff910
Commit
82bff910
authored
Jan 23, 2022
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
hotfix/parallelizeSingleReception
parent
789574c0
No related branches found
No related tags found
2 merge requests
!170
Release
,
!136
hotfix/parallelizeSingleReception
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
single/reception.go
+42
-41
42 additions, 41 deletions
single/reception.go
with
42 additions
and
41 deletions
single/reception.go
+
42
−
41
View file @
82bff910
...
...
@@ -33,20 +33,20 @@ func (m *Manager) receiveTransmissionHandler(rawMessages chan message.Receive,
case
msg
:=
<-
rawMessages
:
jww
.
TRACE
.
Printf
(
"Received CMIX message; checking if it is a "
+
"single-use transmission."
)
go
func
(
m
*
Manager
,
msg
message
.
Receive
)
{
// Check if message is a single-use transmit message
cmixMsg
,
err
:=
format
.
Unmarshal
(
msg
.
Payload
)
if
err
!=
nil
{
jww
.
ERROR
.
Printf
(
"Could not unmarshal msg: %s"
,
err
.
Error
())
continue
return
}
if
fp
!=
cmixMsg
.
GetKeyFP
()
{
// If the verification fails, then ignore the message as it is
// likely garbled or for a different protocol
jww
.
TRACE
.
Print
(
"Failed to read single-use CMIX message: "
+
"fingerprint verification failed."
)
continue
return
}
// Denote that the message is not garbled
...
...
@@ -58,7 +58,7 @@ func (m *Manager) receiveTransmissionHandler(rawMessages chan message.Receive,
if
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Failed to read single-use CMIX message: %+v"
,
err
)
continue
return
}
jww
.
DEBUG
.
Printf
(
"Successfully processed single-use transmission message."
)
...
...
@@ -67,13 +67,14 @@ func (m *Manager) receiveTransmissionHandler(rawMessages chan message.Receive,
if
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Failed to find module to pass single-use "
+
"payload: %+v"
,
err
)
continue
return
}
jww
.
DEBUG
.
Printf
(
"Calling single-use callback with tag "
+
"fingerprint %s."
,
c
.
tagFP
)
go
callback
(
payload
,
c
)
callback
(
payload
,
c
)
}(
m
,
msg
)
}
}
}
...
...
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