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
f7350042
Commit
f7350042
authored
2 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Add debug prints to the message ID lookup logic
parent
1ee5c9e4
No related branches found
No related tags found
2 merge requests
!60
Revert "Fail a test to be sure it works"
,
!10
Make the message id index unique
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indexedDb/implementation.go
+8
-1
8 additions, 1 deletion
indexedDb/implementation.go
with
8 additions
and
1 deletion
indexedDb/implementation.go
+
8
−
1
View file @
f7350042
...
@@ -160,10 +160,17 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
...
@@ -160,10 +160,17 @@ func (w *wasmModel) ReceiveMessage(channelID *id.ID,
// Attempt a lookup on the MessageID if it is non-zero to find an existing
// 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
// entry for it. This occurs any time a sender receives their own message
// from the mixnet.
// from the mixnet.
emptyID
:=
cryptoChannel
.
MessageID
{}
jww
.
DEBUG
.
Printf
(
"messageID: %s, blank messageID: %s"
,
messageID
.
String
(),
emptyID
)
if
!
messageID
.
Equals
(
cryptoChannel
.
MessageID
{})
{
if
!
messageID
.
Equals
(
cryptoChannel
.
MessageID
{})
{
jww
.
DEBUG
.
Printf
(
"non-empty messageID detected"
)
uuid
,
err
:=
w
.
msgIDLookup
(
messageID
)
uuid
,
err
:=
w
.
msgIDLookup
(
messageID
)
if
err
!=
nil
{
if
err
!=
nil
{
// message is already in the database, no insert necessary
jww
.
DEBUG
.
Printf
(
"MessageID found: %d"
,
uuid
)
// message is already in the database, no
// insert necessary
return
uuid
return
uuid
}
}
}
}
...
...
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