Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notifications-bot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package 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
archives
notifications-bot
Commits
205aa30f
Commit
205aa30f
authored
4 years ago
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
update all ephemerals
parent
3c815f86
No related branches found
No related tags found
1 merge request
!2
update all ephemerals
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
storage/storage.go
+3
-2
3 additions, 2 deletions
storage/storage.go
with
3 additions
and
2 deletions
storage/storage.go
+
3
−
2
View file @
205aa30f
...
...
@@ -3,6 +3,7 @@ package storage
import
(
"fmt"
"github.com/pkg/errors"
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/crypto/hash"
"gitlab.com/xx_network/primitives/id/ephemeral"
"time"
...
...
@@ -69,12 +70,12 @@ func (s *Storage) DeleteUser(transmissionRSA []byte) error {
}
func
(
s
*
Storage
)
AddEphemeralsForOffset
(
offset
int64
,
epoch
int32
,
size
uint
)
error
{
users
,
err
:=
s
.
g
etUsers
ByOffset
(
offset
)
users
,
err
:=
s
.
G
et
All
Users
(
)
if
err
!=
nil
{
return
errors
.
WithMessage
(
err
,
"Failed to get users for given offset"
)
}
if
len
(
users
)
>
0
{
fmt
.
Println
(
fmt
.
Sprintf
(
"Adding ephemerals for users: %+v"
,
users
))
jww
.
INFO
.
Println
(
fmt
.
Sprintf
(
"Adding ephemerals for users: %+v"
,
users
))
}
for
_
,
u
:=
range
users
{
eid
,
_
,
_
,
err
:=
ephemeral
.
GetIdFromIntermediary
(
u
.
IntermediaryId
,
size
,
time
.
Now
()
.
UnixNano
())
...
...
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