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
539f0698
Commit
539f0698
authored
2 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
Remove hackTestDb
parent
72b2ab22
No related branches found
No related tags found
2 merge requests
!67
fix for latest client release
,
!52
XX-4382 / Move indexedDb databases to web workers
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indexedDb/channels/init.go
+0
-25
0 additions, 25 deletions
indexedDb/channels/init.go
with
0 additions
and
25 deletions
indexedDb/channels/init.go
+
0
−
25
View file @
539f0698
...
@@ -176,31 +176,6 @@ func v1Upgrade(db *idb.Database) error {
...
@@ -176,31 +176,6 @@ func v1Upgrade(db *idb.Database) error {
return
nil
return
nil
}
}
// hackTestDb is a horrible function that exists as the result of an extremely
// long discussion about why initializing the IndexedDb sometimes silently
// fails. It ultimately tries to prevent an unrecoverable situation by actually
// inserting some nonsense data and then checking to see if it persists.
// If this function still exists in 2023, god help us all. Amen.
func
(
w
*
wasmModel
)
hackTestDb
()
error
{
testMessage
:=
&
Message
{
ID
:
0
,
Nickname
:
"test"
,
MessageID
:
id
.
DummyUser
.
Marshal
(),
}
msgId
,
helper
:=
w
.
receiveHelper
(
testMessage
,
false
)
if
helper
!=
nil
{
return
helper
}
result
,
err
:=
indexedDb
.
Get
(
w
.
db
,
messageStoreName
,
js
.
ValueOf
(
msgId
))
if
err
!=
nil
{
return
err
}
if
result
.
IsUndefined
()
{
return
errors
.
Errorf
(
"Failed to test db, record not present"
)
}
return
nil
}
// storeDatabaseName sends the database name to storage.StoreIndexedDb in the
// storeDatabaseName sends the database name to storage.StoreIndexedDb in the
// main thread to be stored in localstorage and waits for the error to be
// main thread to be stored in localstorage and waits for the error to be
// returned.
// returned.
...
...
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