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
e64080f9
Commit
e64080f9
authored
Dec 20, 2022
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Fix interfacing in production code
parent
b3d9dee2
No related branches found
No related tags found
2 merge requests
!510
Release
,
!479
Xx 4415/send many assembler
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmix/interface.go
+2
-2
2 additions, 2 deletions
cmix/interface.go
fileTransfer/send.go
+3
-2
3 additions, 2 deletions
fileTransfer/send.go
with
5 additions
and
4 deletions
cmix/interface.go
+
2
−
2
View file @
e64080f9
...
...
@@ -84,7 +84,7 @@ type Client interface {
// Will return an error if the network is unhealthy or if it fails to send
// (along with the reason). Blocks until successful send or err.
// WARNING: Do not roll your own crypto.
SendMany
(
recipients
[]
*
id
.
ID
,
assembler
ManyMessageAssembler
,
SendMany
(
recipients
[]
*
id
.
ID
,
messages
[]
TargetedCmixMessage
,
params
CMIXParams
)
(
rounds
.
Round
,
[]
ephemeral
.
Id
,
error
)
// SendWithAssembler sends a variable cmix payload to the provided recipient.
...
...
@@ -122,7 +122,7 @@ type Client interface {
// (along with the reason). Blocks until successful sends or errors.
// WARNING: Do not roll your own crypto.
SendManyWithAssembler
(
recipients
[]
*
id
.
ID
,
assembler
ManyMessageAssembler
,
params
CMIXParams
)
params
CMIXParams
)
(
rounds
.
Round
,
[]
ephemeral
.
Id
,
error
)
/* === Message Reception ================================================ */
/* Identities are all network identities which the client is currently
...
...
This diff is collapsed.
Click to expand it.
fileTransfer/send.go
+
3
−
2
View file @
e64080f9
...
...
@@ -128,6 +128,7 @@ func (m *manager) sendCmix(packet []store.Part) {
// Encrypt each part and to a TargetedCmixMessage
messages
:=
make
([]
cmix
.
TargetedCmixMessage
,
0
,
len
(
packet
))
recipients
:=
make
([]
*
id
.
ID
,
0
,
len
(
packet
))
for
_
,
p
:=
range
packet
{
encryptedPart
,
mac
,
fp
,
err
:=
p
.
GetEncryptedPart
(
m
.
cmix
.
GetMaxMessageLength
())
...
...
@@ -139,7 +140,7 @@ func (m *manager) sendCmix(packet []store.Part) {
}
validParts
=
append
(
validParts
,
p
)
recipients
=
append
(
recipients
,
p
.
Recipient
())
messages
=
append
(
messages
,
cmix
.
TargetedCmixMessage
{
Recipient
:
p
.
Recipient
(),
Payload
:
encryptedPart
,
...
...
@@ -155,7 +156,7 @@ func (m *manager) sendCmix(packet []store.Part) {
jww
.
DEBUG
.
Printf
(
"[FT] Sending %d file parts via SendManyCMIX"
,
len
(
messages
))
rid
,
_
,
err
:=
m
.
cmix
.
SendMany
(
messages
,
m
.
params
.
Cmix
)
rid
,
_
,
err
:=
m
.
cmix
.
SendMany
(
recipients
,
messages
,
m
.
params
.
Cmix
)
if
err
!=
nil
{
jww
.
WARN
.
Printf
(
"[FT] Failed to send %d file parts via "
+
"SendManyCMIX: %+v"
,
len
(
messages
),
err
)
...
...
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