This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 55
fixing namespace seeding issue #241
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1ea20f5
fixing namespace seeding issue
nitro-neal 0188105
Merge branch 'main' into bolt-namespace-issue
decentralgabe b918a65
returning nil instead of error if no namespace exists
nitro-neal 98ec813
adding unit test
nitro-neal 3e2cd95
removing logs
nitro-neal 6ec9c9d
Merge branch 'main' into bolt-namespace-issue
nitro-neal 9e6c47f
add logs back
nitro-neal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,25 +78,6 @@ func NewCredentialStorage(db storage.ServiceStorage) (*Storage, error) { | |
return nil, errors.New("bolt db reference is nil") | ||
} | ||
|
||
// TODO: (Neal) there is a current bug with our Bolt implementation where if we do a GET without anything in the db it will throw an error | ||
// Doing initial writes and then deleting will "warm up" our database and when we do a GET after that it will not crash and return empty list | ||
// https://github.com/TBD54566975/ssi-service/issues/176 | ||
if err := db.Write(credentialNamespace, fakeKey, nil); err != nil { | ||
return nil, util.LoggingErrorMsg(err, "problem writing status initial write to db") | ||
|
||
} | ||
if err := db.Delete(credentialNamespace, fakeKey); err != nil { | ||
return nil, util.LoggingErrorMsg(err, "problem with initial delete to db") | ||
} | ||
|
||
if err := db.Write(statusListCredentialNamespace, fakeKey, nil); err != nil { | ||
return nil, util.LoggingErrorMsg(err, "problem writing status initial write to db") | ||
} | ||
|
||
if err := db.Delete(statusListCredentialNamespace, fakeKey); err != nil { | ||
return nil, util.LoggingErrorMsg(err, "problem with initial delete to db") | ||
} | ||
|
||
Comment on lines
-81
to
-99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😍 |
||
randUniqueList := randomUniqueNum(bitStringLength) | ||
uniqueNumBytes, err := json.Marshal(randUniqueList) | ||
if err != nil { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logrus.WithError(err).Warnf(...