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
c7a578f7
Commit
c7a578f7
authored
Sep 17, 2020
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
made popKeys return a bool of sucesfull instead of an error
parent
e4aa8f1a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
storage/e2e/store.go
+4
-4
4 additions, 4 deletions
storage/e2e/store.go
with
4 additions
and
4 deletions
storage/e2e/store.go
+
4
−
4
View file @
c7a578f7
...
@@ -168,7 +168,7 @@ func (s *Store) GetPartner(partnerID *id.ID) (*Manager, error) {
...
@@ -168,7 +168,7 @@ func (s *Store) GetPartner(partnerID *id.ID) (*Manager, error) {
}
}
//Pops a key for use based upon its fingerprint
//Pops a key for use based upon its fingerprint
func
(
s
*
Store
)
PopKey
(
f
format
.
Fingerprint
)
(
*
Key
,
error
)
{
func
(
s
*
Store
)
PopKey
(
f
format
.
Fingerprint
)
(
*
Key
,
bool
)
{
return
s
.
fingerprints
.
Pop
(
f
)
return
s
.
fingerprints
.
Pop
(
f
)
}
}
...
@@ -272,14 +272,14 @@ func (f *fingerprints) remove(keys []*Key) {
...
@@ -272,14 +272,14 @@ func (f *fingerprints) remove(keys []*Key) {
}
}
}
}
func
(
f
*
fingerprints
)
Pop
(
fingerprint
format
.
Fingerprint
)
(
*
Key
,
error
)
{
func
(
f
*
fingerprints
)
Pop
(
fingerprint
format
.
Fingerprint
)
(
*
Key
,
bool
)
{
f
.
mux
.
Lock
()
f
.
mux
.
Lock
()
defer
f
.
mux
.
Unlock
()
defer
f
.
mux
.
Unlock
()
key
,
ok
:=
f
.
toKey
[
fingerprint
]
key
,
ok
:=
f
.
toKey
[
fingerprint
]
if
!
ok
{
if
!
ok
{
return
nil
,
errors
.
New
(
"Key could not be found"
)
return
nil
,
false
}
}
delete
(
f
.
toKey
,
fingerprint
)
delete
(
f
.
toKey
,
fingerprint
)
...
@@ -288,5 +288,5 @@ func (f *fingerprints) Pop(fingerprint format.Fingerprint) (*Key, error) {
...
@@ -288,5 +288,5 @@ func (f *fingerprints) Pop(fingerprint format.Fingerprint) (*Key, error) {
key
.
fp
=
&
fingerprint
key
.
fp
=
&
fingerprint
return
key
,
nil
return
key
,
true
}
}
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