Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxdk-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
xxdk-wasm
Commits
8a7916d9
Commit
8a7916d9
authored
2 years ago
by
benjamin
Browse files
Options
Downloads
Patches
Plain Diff
removed broken guard code in reception functions
parent
a5e42c5d
No related branches found
No related tags found
1 merge request
!60
Revert "Fail a test to be sure it works"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indexedDb/implementation.go
+0
-39
0 additions, 39 deletions
indexedDb/implementation.go
with
0 additions
and
39 deletions
indexedDb/implementation.go
+
0
−
39
View file @
8a7916d9
...
@@ -157,23 +157,6 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
...
@@ -157,23 +157,6 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
msgToInsert
:=
buildMessage
(
channelID
.
Marshal
(),
messageID
.
Bytes
(),
nil
,
msgToInsert
:=
buildMessage
(
channelID
.
Marshal
(),
messageID
.
Bytes
(),
nil
,
nickname
,
text
,
identity
,
timestamp
,
lease
,
round
.
ID
,
mType
,
status
)
nickname
,
text
,
identity
,
timestamp
,
lease
,
round
.
ID
,
mType
,
status
)
// Attempt a lookup on the MessageID if it is non-zero to find an existing
// entry for it. This occurs any time a sender receives their own message
// from the mixnet.
emptyID
:=
cryptoChannel
.
MessageID
{}
jww
.
DEBUG
.
Printf
(
"messageID: %s, blank messageID: %s"
,
messageID
.
String
(),
emptyID
)
if
!
messageID
.
Equals
(
cryptoChannel
.
MessageID
{})
{
jww
.
DEBUG
.
Printf
(
"non-empty messageID detected"
)
uuid
,
err
:=
w
.
msgIDLookup
(
messageID
)
if
err
==
nil
&&
uuid
!=
0
{
jww
.
WARN
.
Printf
(
"found MessageID, will upsert: %d"
,
uuid
)
msgToInsert
.
ID
=
uuid
}
}
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
if
err
!=
nil
{
if
err
!=
nil
{
jww
.
ERROR
.
Printf
(
"Failed to receiver message: %+v"
,
err
)
jww
.
ERROR
.
Printf
(
"Failed to receiver message: %+v"
,
err
)
...
@@ -199,17 +182,6 @@ func (w *wasmModel) ReceiveReply(channelID *id.ID,
...
@@ -199,17 +182,6 @@ func (w *wasmModel) ReceiveReply(channelID *id.ID,
replyTo
.
Bytes
(),
nickname
,
text
,
identity
,
timestamp
,
lease
,
round
.
ID
,
replyTo
.
Bytes
(),
nickname
,
text
,
identity
,
timestamp
,
lease
,
round
.
ID
,
mType
,
status
)
mType
,
status
)
// Attempt a lookup on the MessageID if it is non-zero to find an existing
// entry for it. This occurs any time a sender receives their own message
// from the mixnet.
if
!
messageID
.
Equals
(
cryptoChannel
.
MessageID
{})
{
uuid
,
err
:=
w
.
msgIDLookup
(
messageID
)
if
err
!=
nil
{
// message is already in the database, no insert necessary
return
uuid
}
}
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -235,17 +207,6 @@ func (w *wasmModel) ReceiveReaction(channelID *id.ID,
...
@@ -235,17 +207,6 @@ func (w *wasmModel) ReceiveReaction(channelID *id.ID,
reactionTo
.
Bytes
(),
nickname
,
reaction
,
identity
,
timestamp
,
lease
,
reactionTo
.
Bytes
(),
nickname
,
reaction
,
identity
,
timestamp
,
lease
,
round
.
ID
,
mType
,
status
)
round
.
ID
,
mType
,
status
)
// Attempt a lookup on the MessageID if it is non-zero to find
// an existing entry for it. This occurs any time a sender
// receives their own message from the mixnet.
if
!
messageID
.
Equals
(
cryptoChannel
.
MessageID
{})
{
uuid
,
err
:=
w
.
msgIDLookup
(
messageID
)
if
err
==
nil
{
// message is already in the database, no insert necessary
return
uuid
}
}
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
uuid
,
err
:=
w
.
receiveHelper
(
msgToInsert
)
if
err
!=
nil
{
if
err
!=
nil
{
jww
.
ERROR
.
Printf
(
"Failed to receive reaction: %+v"
,
err
)
jww
.
ERROR
.
Printf
(
"Failed to receive reaction: %+v"
,
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