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
41c08e05
Commit
41c08e05
authored
Feb 15, 2021
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
removed bad rejection of new IDs
parent
1a129d39
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
network/ephemeral/tracker.go
+4
-13
4 additions, 13 deletions
network/ephemeral/tracker.go
with
4 additions
and
13 deletions
network/ephemeral/tracker.go
+
4
−
13
View file @
41c08e05
...
@@ -86,17 +86,12 @@ func track(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
...
@@ -86,17 +86,12 @@ func track(session *storage.Session, ourId *id.ID, stop *stoppable.Single) {
// Add identities to storage if unique
// Add identities to storage if unique
for
_
,
identity
:=
range
identities
{
for
_
,
identity
:=
range
identities
{
// Track if identity has been generated already
if
identity
.
StartValid
.
After
(
lastCheck
)
{
// If not not, insert identity into store
if
err
=
receptionStore
.
AddIdentity
(
identity
);
err
!=
nil
{
if
err
=
receptionStore
.
AddIdentity
(
identity
);
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Could not insert "
+
jww
.
FATAL
.
Panicf
(
"Could not insert "
+
"identity: %v"
,
err
)
"identity: %v"
,
err
)
}
}
}
}
}
// Generate the time stamp for storage
// Generate the time stamp for storage
vo
,
err
:=
marshalTimestamp
(
now
)
vo
,
err
:=
marshalTimestamp
(
now
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -192,11 +187,7 @@ func calculateTickerTime(baseIDs []ephemeral.ProtoIdentity) time.Duration {
...
@@ -192,11 +187,7 @@ func calculateTickerTime(baseIDs []ephemeral.ProtoIdentity) time.Duration {
return
time
.
Duration
(
0
)
return
time
.
Duration
(
0
)
}
}
// Get the last identity in the list
// Get the last identity in the list
index
:=
0
lastIdentity
:=
baseIDs
[
len
(
baseIDs
)
-
1
]
if
len
(
baseIDs
)
-
1
>
0
{
index
=
len
(
baseIDs
)
-
1
}
lastIdentity
:=
baseIDs
[
index
]
// Factor out the grace period previously expanded upon.
// Factor out the grace period previously expanded upon.
// Calculate and return that duration
// Calculate and return that duration
...
...
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